use exceptions instead of hard abort
This commit is contained in:
+1
-11
@@ -31,6 +31,7 @@ or see http://www.gnu.org/licenses/agpl.txt.
|
||||
#include "../Plugins/ViaRoutePlugin.h"
|
||||
#include "../Plugins/RouteParameters.h"
|
||||
#include "../Util/BaseConfiguration.h"
|
||||
#include "../Util/OSRMException.h"
|
||||
#include "../Util/InputFileUtil.h"
|
||||
#include "../Server/BasicDatastructures.h"
|
||||
|
||||
@@ -39,19 +40,8 @@ or see http://www.gnu.org/licenses/agpl.txt.
|
||||
#include <boost/noncopyable.hpp>
|
||||
#include <boost/thread.hpp>
|
||||
|
||||
#include <exception>
|
||||
#include <vector>
|
||||
|
||||
class OSRMException: public std::exception {
|
||||
public:
|
||||
OSRMException(const char * message) : message(message) {}
|
||||
private:
|
||||
virtual const char* what() const throw() {
|
||||
return message;
|
||||
}
|
||||
const char * message;
|
||||
};
|
||||
|
||||
class OSRM : boost::noncopyable {
|
||||
typedef boost::unordered_map<std::string, BasePlugin *> PluginMap;
|
||||
QueryObjectsStorage * objects;
|
||||
|
||||
Reference in New Issue
Block a user