X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fstructure%2Fexception.hxx;h=bfa978ee82dba26c884135ddaab87987f2d2fe0a;hb=c955e61ba785a7b4699ed0a35f947fb661cab854;hp=eaf126959f5901f4482f3be686d59400b58c89f3;hpb=76948416a9624ba269d2baeac294c6db0853f104;p=simgear.git diff --git a/simgear/structure/exception.hxx b/simgear/structure/exception.hxx index eaf12695..bfa978ee 100644 --- a/simgear/structure/exception.hxx +++ b/simgear/structure/exception.hxx @@ -26,7 +26,7 @@ using std::string; class sg_location { public: - enum {MAX_PATH = 1024}; + enum {max_path = 1024}; sg_location (); sg_location(const std::string& path, int line = -1, int column = -1); explicit sg_location(const char* path, int line = -1, int column = -1); @@ -41,7 +41,7 @@ public: virtual void setByte (int byte); virtual std::string asString () const; private: - char _path[MAX_PATH]; + char _path[max_path]; int _line; int _column; int _byte; @@ -133,6 +133,9 @@ public: sg_io_exception (const char* message, const sg_location &location, const char* origin = 0); sg_io_exception (const std::string &message, const std::string &origin = ""); + sg_io_exception (const std::string &message, const sg_location &location, + const std::string &origin = ""); + virtual ~sg_io_exception () throw (); virtual const std::string getFormattedMessage () const; virtual const sg_location &getLocation () const;