Changeset 10269 for code/trunk/src/libraries/core
- Timestamp:
- Feb 14, 2015, 12:51:14 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/libraries/core/Loader.cc
r10265 r10269 237 237 orxout(user_error, context::loader) << endl; 238 238 orxout(user_error, context::loader) << "An XML-error occurred in Loader.cc while loading " << file->getFilename() << ':' << endl; 239 orxout(user_error, context::loader) << ex.what() << endl; 240 orxout(user_error, context::loader) << "Loading aborted." << endl; 239 OutputLevel ticpplevel = user_error; 241 240 if (lineTrace->size() > 0) 242 241 { 242 ticpplevel = internal_error; 243 243 //Extract the line number from the exception 244 244 std::string tempstring(ex.what()); … … 252 252 { 253 253 std::vector<std::pair<std::string, size_t> > linesources = lineTrace->at(line - 1); 254 orxout(user_error, context::loader) << "Line contains data from:" << endl; 254 std::ostringstream message; 255 message << "Possible sources of error:" << endl; 255 256 for (std::vector<std::pair<std::string, size_t> >::iterator it = linesources.begin(); it != linesources.end(); ++it) 256 257 { 257 orxout(user_error, context::loader) << it->first << " , Line " << it->second << endl; 258 } 258 message << it->first << ", Line " << it->second << endl; 259 } 260 orxout(user_error, context::loader) << message.str() << endl; 259 261 } 260 262 } 261 263 } 264 orxout(ticpplevel, context::loader) << ex.what() << endl; 265 orxout(user_error, context::loader) << "Loading aborted." << endl; 262 266 } 263 267 catch (Exception& ex) … … 283 287 outfile.flush(); 284 288 outfile.close(); 285 orxout( user_error, context::loader) << "The complete xml file has been saved to " << temppath << endl;289 orxout(internal_error, context::loader) << "The complete xml file has been saved to " << temppath << endl; 286 290 #endif 287 291 return false;
Note: See TracChangeset
for help on using the changeset viewer.