22 #ifndef EXCEPTIONS_HPP 23 #define EXCEPTIONS_HPP 41 typedef boost::error_info<struct TagWhatInfo, string>
InfoWhat;
43 typedef boost::error_info<struct TagFileName, string>
InfoFileName;
57 typedef boost::error_info<struct TagParserLogger, shared_ptr<ParserLogger> >
InfoParserLogger;
62 virtual const char*
what()
const throw()
64 if(
string const* info = boost::get_error_info<InfoWhat>(*
this))
66 return std::exception::what();
91 template<
typename Info>
94 typedef typename boost::exception_detail::get_error_info_return_type<boost::exception,typename Info::value_type>::type
value_type;
97 ErrorOut(boost::exception& e,
const string& fallbackInfo =
"'unknown'")
98 : fallbackInfo(fallbackInfo)
99 , value(
boost::get_error_info<Info>(e))
107 template<
typename Stream,
typename Info>
108 std::basic_ostream<Stream>& operator <<(std::basic_ostream<Stream>& os,
const ErrorOut<Info>& info)
114 os << info.fallbackInfo;
Thrown if no more time is left.
virtual const char * what() const
boost::exception_detail::get_error_info_return_type< boost::exception, typename Info::value_type >::type value_type
Thrown if the parsing fails.
boost::error_info< struct TagXmlEntityName, string > InfoXmlEntityName
Use this this to specify the exception related xml entity.
Thrown if an osm id was not specified before resolving.
boost::error_info< struct TagParserLogger, shared_ptr< ParserLogger > > InfoParserLogger
Contains the logger used while parsing.
boost::error_info< struct TagBadSourceValue, string > InfoBadSourceValue
String representation of a bad source value.
boost::error_info< struct TagWhatInfo, string > InfoWhat
Use this info to give an what msg to the exception.
boost::error_info< struct TagFailureLine, int > InfoFailureLine
Specifies the Line in the file where the failure appeared.
boost::error_info< struct TagFailureLineContent, string > InfoFailureLineContent
Contains the content of the line where a failure appeared.
boost::error_info< struct TagUnresolvableId, long > InfoUnresolvableId
Specifies the id, which was not resolvable.
Thrown if a file was not found.
boost::error_info< struct TagFailureColumn, int > InfoFailureColumn
Specifies the Column in the Line in the file where the failure appeared.
ErrorOut(boost::exception &e, const string &fallbackInfo="'unknown'")
Thrown if a file was not writeable.
Base of most exceptions thrown by alacarte.
boost::error_info< struct TagFileName, string > InfoFileName
Use this to inform about a file name.
Thrown on a point where implementation is missing.