]> git.tdb.fi Git - libs/datafile.git/blobdiff - source/except.h
Refactor exceptions
[libs/datafile.git] / source / except.h
index 4573e947297dedd3f8311b92842d7f62faa98aa4..7892db5be1c292a34ff9c239d0d309b937f708fb 100644 (file)
@@ -1,11 +1,12 @@
 /* $Id$
 
 This file is part of libmspdatafile
-Copyright © 2006  Mikko Rasa, Mikkosoft Productions
+Copyright © 2008  Mikko Rasa, Mikkosoft Productions
 Distributed under the LGPL
 */
-#ifndef MSP_DATAFILE_ERROR_H_
-#define MSP_DATAFILE_ERROR_H_
+
+#ifndef MSP_DATAFILE_EXCEPT_H_
+#define MSP_DATAFILE_EXCEPT_H_
 
 #include <msp/core/except.h>
 
@@ -15,19 +16,13 @@ namespace DataFile {
 class TypeError: public Exception
 {
 public:
-       TypeError(const std::string &w_): Exception(w_) { }
+       TypeError(const std::string &w): Exception(w) { }
 };
 
 class ParseError: public Exception
 {
 public:
-       ParseError(const std::string &w_, const std::string &s, unsigned l): Exception(w_), source(s), line(l) { }
-       const std::string &get_source() const { return source; }
-       unsigned          get_line() const    { return line; }
-       ~ParseError() throw() { }
-private:
-       std::string source;
-       unsigned    line;
+       ParseError(const std::string &w): Exception(w) { }
 };
 
 } // namespace DataFile