[Genabel-commits] r1953 - pkg/MixABEL/src/MXlib

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Apr 30 23:59:22 CEST 2015


Author: lckarssen
Date: 2015-04-30 23:59:21 +0200 (Thu, 30 Apr 2015)
New Revision: 1953

Modified:
   pkg/MixABEL/src/MXlib/exception.cpp
   pkg/MixABEL/src/MXlib/exception.h
Log:
Cleaned up white space in two MixABEL source files. Now follows the coding style guidelines.


Modified: pkg/MixABEL/src/MXlib/exception.cpp
===================================================================
--- pkg/MixABEL/src/MXlib/exception.cpp	2015-04-30 20:56:35 UTC (rev 1952)
+++ pkg/MixABEL/src/MXlib/exception.cpp	2015-04-30 21:59:21 UTC (rev 1953)
@@ -1,57 +1,57 @@
 #include "exception.h"
 #include <iostream>
-#include <sstream> 
+#include <sstream>
 
 namespace exc
 {
-  
+
   exception::exception(int code,
-		       const char* file,
-		       const char* line,
-		       const char* reason)
+                       const char* file,
+                       const char* line,
+                       const char* reason)
     : m_code(code), m_file(file), m_line(line), m_reason(reason)
   {
     exc_type="Exception";
   }
 
-  
+
   void exception::PrintWhat() const
   {
     PrintWhat(std::cerr);
   }
-  
+
   void exception::PrintWhat(std::ostream& where) const
   {
     where << what();
   }
-  
+
   const char* exception::what() const throw()
   {
     std::stringstream ss;
     ss << exc_type << " due to " << m_reason << std::endl << "Please report code "
-	  << m_code << " occured at "
+          << m_code << " occured at "
        << m_file << ":" << m_line << "." << std::endl;
     return ss.str().c_str();
   }
-  
+
   void exception::SetFile(const std::string& file)
   {
     m_file = file;
   }
-    
+
   void exception::SetLine(const std::string& line)
   {
     m_line = line;
   }
-  
+
   void exception::SetReason(const std::string& reason)
   {
     m_reason = reason;
   }
-  
+
   const std::string& exception::GetReason() const
   {
     return m_reason;
   }
-  
+
 }

Modified: pkg/MixABEL/src/MXlib/exception.h
===================================================================
--- pkg/MixABEL/src/MXlib/exception.h	2015-04-30 20:56:35 UTC (rev 1952)
+++ pkg/MixABEL/src/MXlib/exception.h	2015-04-30 21:59:21 UTC (rev 1953)
@@ -8,9 +8,9 @@
     {
     public:
     exception(int code,
-	      const char* file,
-	      const char* line,
-	      const char* reason);
+              const char* file,
+              const char* line,
+              const char* reason);
     virtual void PrintWhat(std::ostream& where) const;
     virtual void PrintWhat() const;
     virtual const char* what() const throw();
@@ -19,10 +19,10 @@
     void SetReason(const std::string& reason);
     const std::string& GetReason() const;
     virtual ~exception() throw() {};
-    
+
     protected:
     std::string exc_type;
-    
+
     private:
     int m_code;
     std::string m_file;
@@ -30,33 +30,33 @@
     std::string m_reason;
     };
 
-  class bad_alloc : public exception 
+  class bad_alloc : public exception
   {
   public:
     bad_alloc(int code,
-	      const char* file,
-	      const char* line,
-	      const char* reason) throw() : exception(code, file, line, reason) { exc_type="Bad allocation";}
+              const char* file,
+              const char* line,
+              const char* reason) throw() : exception(code, file, line, reason) { exc_type="Bad allocation";}
     virtual ~bad_alloc() throw() {};
   };
-  
- class logic_error : public exception 
+
+ class logic_error : public exception
   {
   public:
     logic_error(int code,
-	      const char* file,
-	      const char* line,
-	      const char* reason) throw() : exception(code, file, line, reason) {exc_type="Logical error";}
+              const char* file,
+              const char* line,
+              const char* reason) throw() : exception(code, file, line, reason) {exc_type="Logical error";}
     virtual ~logic_error() throw() {};
   };
-  
+
   class invalid_argument : public logic_error
   {
   public:
     invalid_argument(int code,
-	      const char* file,
-	      const char* line,
-		     const char* reason) throw() : logic_error(code, file, line, reason) {exc_type="Invalid argument"; }
+              const char* file,
+              const char* line,
+                     const char* reason) throw() : logic_error(code, file, line, reason) {exc_type="Invalid argument"; }
     virtual ~invalid_argument() throw() {};
   };
 
@@ -64,9 +64,9 @@
   {
   public:
     domain_error(int code,
-	      const char* file,
-	      const char* line,
-		 const char* reason) throw() : logic_error(code, file, line, reason) {exc_type="Domain error"; }
+              const char* file,
+              const char* line,
+                 const char* reason) throw() : logic_error(code, file, line, reason) {exc_type="Domain error"; }
     virtual ~domain_error() throw() {};
   };
 
@@ -74,9 +74,9 @@
   {
   public:
     runtime_error(int code,
-	      const char* file,
-	      const char* line,
-	      const char* reason) throw() : exception(code, file, line, reason) {exc_type="Runtime error";  }
+              const char* file,
+              const char* line,
+              const char* reason) throw() : exception(code, file, line, reason) {exc_type="Runtime error";  }
     virtual ~runtime_error() throw() {};
   };
 
@@ -84,9 +84,9 @@
   {
   public:
     overflow_error(int code,
-	      const char* file,
-	      const char* line,
-	      const char* reason) throw() : runtime_error(code, file, line, reason) {exc_type="Overflow error";  }
+              const char* file,
+              const char* line,
+              const char* reason) throw() : runtime_error(code, file, line, reason) {exc_type="Overflow error";  }
     virtual ~overflow_error() throw() {};
   };
 
@@ -94,9 +94,9 @@
   {
   public:
     range_error(int code,
-	      const char* file,
-	      const char* line,
-	      const char* reason) throw() : runtime_error(code, file, line, reason) {exc_type="Range error"; }
+              const char* file,
+              const char* line,
+              const char* reason) throw() : runtime_error(code, file, line, reason) {exc_type="Range error"; }
     virtual ~range_error() throw() {};
   };
 
@@ -104,9 +104,9 @@
   {
   public:
     underflow_error(int code,
-	      const char* file,
-	      const char* line,
-	      const char* reason) throw() : runtime_error(code, file, line, reason) {exc_type="Underflow error"; }
+              const char* file,
+              const char* line,
+              const char* reason) throw() : runtime_error(code, file, line, reason) {exc_type="Underflow error"; }
     virtual ~underflow_error() throw() {};
   };
 



More information about the Genabel-commits mailing list