diff --git a/Framework/Kernel/inc/MantidKernel/ConfigService.h b/Framework/Kernel/inc/MantidKernel/ConfigService.h index 2bda1047f2dc6b1f5fd80d2e9704ca4c05a7dd23..a0fc05c22245fbbe76ca971ce53435853580c3f0 100644 --- a/Framework/Kernel/inc/MantidKernel/ConfigService.h +++ b/Framework/Kernel/inc/MantidKernel/ConfigService.h @@ -266,8 +266,6 @@ private: /// Read a file and place its contents into the given string bool readFile(const std::string &filename, std::string &contents) const; - /// Provides a string of a default configuration - std::string defaultConfig() const; /// Writes out a fresh user properties file void createUserPropertiesFile() const; /// Convert any relative paths to absolute ones and store them locally so that diff --git a/Framework/Kernel/src/ConfigService.cpp b/Framework/Kernel/src/ConfigService.cpp index 9a6428290e30c3b4566342b2c366705e3ccbee80..45ea2ef45830b3076948429b8c3872b122c0a89e 100644 --- a/Framework/Kernel/src/ConfigService.cpp +++ b/Framework/Kernel/src/ConfigService.cpp @@ -367,11 +367,9 @@ void ConfigServiceImpl::loadConfig(const std::string &filename, } catch (std::exception &e) { // there was a problem loading the file - it probably is not there std::cerr << "Problem loading the configuration file " << filename << " " - << e.what() << '\n'; - if (!append) { - // if we have no property values then take the default - m_PropertyString = defaultConfig(); - } + << e.what() << '\n'; + std::cerr << "Mantid is unable to start.\n" << std::endl; + throw; } // use the cached property string to initialise the POCO property file @@ -657,29 +655,6 @@ void ConfigServiceImpl::createUserPropertiesFile() const { } } -/** - * Provides a default Configuration string to use if the config file cannot be - * loaded. - * @returns The string value of default properties - */ -std::string ConfigServiceImpl::defaultConfig() const { - std::string propFile = - "# logging configuration" - "# root level message filter (drop to debug for more messages)" - "logging.loggers.root.level = notice" - "# splitting the messages to many logging channels" - "logging.loggers.root.channel.class = SplitterChannel" - "logging.loggers.root.channel.channel1 = consoleChannel" - "# output to the console - primarily for console based apps" - "logging.channels.consoleChannel.class = ConsoleChannel" - "logging.channels.consoleChannel.formatter = f1" - "# specfic filter for the file channel raising the level to warning " - "logging.formatters.f1.class = PatternFormatter" - "logging.formatters.f1.pattern = %s-[%p] %t" - "logging.formatters.f1.times = UTC"; - return propFile; -} - //------------------------------- // Public member functions //-------------------------------