RtError: made printMessage and other get methods const
authorTristan Matthews <le.businessman@gmail.com>
Tue, 2 Nov 2010 21:10:52 +0000 (21:10 +0000)
committerStephen Sinclair <sinclair@music.mcgill.ca>
Thu, 10 Oct 2013 23:38:26 +0000 (01:38 +0200)
RtError.h

index ac5c41498ab8acde3288c1eb246a7d0674ea6c0b..a64f43430e2046d8cfac12e79f687a795334bc5c 100644 (file)
--- a/RtError.h
+++ b/RtError.h
@@ -41,13 +41,13 @@ class RtError : public std::exception
   virtual ~RtError( void ) throw() {}
 
   //! Prints thrown error message to stderr.
-  virtual void printMessage( void ) throw() { std::cerr << '\n' << message_ << "\n\n"; }
+  virtual void printMessage( void ) const throw() { std::cerr << '\n' << message_ << "\n\n"; }
 
   //! Returns the thrown error message type.
-  virtual const Type& getType(void) throw() { return type_; }
+  virtual const Type& getType(void) const throw() { return type_; }
 
   //! Returns the thrown error message string.
-  virtual const std::string& getMessage(void) throw() { return message_; }
+  virtual const std::string& getMessage(void) const throw() { return message_; }
 
   //! Returns the thrown error message as a c-style string.
   virtual const char* what( void ) const throw() { return message_.c_str(); }