Index: src/Exceptions/Makefile.am
===================================================================
--- src/Exceptions/Makefile.am	(revision b88fe4cde25eb17a90126edc680f80f5b35c49c9)
+++ src/Exceptions/Makefile.am	(revision b94634903469fbb4f8f27672f141d13d2700a169)
@@ -10,7 +10,5 @@
   CustomException.cpp \
   IllegalTypeException.cpp \
-  MissingValueException.cpp \
-  NotOnSurfaceException.cpp \
-  ShapeException.cpp
+  MissingValueException.cpp
 	
 				  
@@ -18,6 +16,5 @@
   CustomException.hpp \
   IllegalTypeException.hpp \
-  MissingValueException.hpp \
-  NotOnSurfaceException.hpp
+  MissingValueException.hpp
 
 
Index: c/Exceptions/NotOnSurfaceException.cpp
===================================================================
--- src/Exceptions/NotOnSurfaceException.cpp	(revision b88fe4cde25eb17a90126edc680f80f5b35c49c9)
+++ 	(revision )
@@ -1,28 +1,0 @@
-/*
- * NotOnSurfaceException.cpp
- *
- *  Created on: Jul 14, 2010
- *      Author: crueger
- */
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "CodePatterns/MemDebug.hpp"
-
-#include "NotOnSurfaceException.hpp"
-
-using namespace std;
-
-NotOnSurfaceException::NotOnSurfaceException(string _file, int _line) :
-  ShapeException(_file,_line)
-{}
-
-NotOnSurfaceException::~NotOnSurfaceException() throw ()
-{}
-
-const char* NotOnSurfaceException::what() const throw(){
-  return "Given point did not lie on surface of Shape";
-}
Index: c/Exceptions/NotOnSurfaceException.hpp
===================================================================
--- src/Exceptions/NotOnSurfaceException.hpp	(revision b88fe4cde25eb17a90126edc680f80f5b35c49c9)
+++ 	(revision )
@@ -1,28 +1,0 @@
-/*
- * NotOnSurfaceException.hpp
- *
- *  Created on: Jul 14, 2010
- *      Author: crueger
- */
-
-#ifndef NOTONSURFACEEXCEPTION_HPP_
-#define NOTONSURFACEEXCEPTION_HPP_
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-
-#include "Exceptions/ShapeException.hpp"
-
-class NotOnSurfaceException : public ShapeException
-{
-public:
-  NotOnSurfaceException(std::string _file, int _line);
-  virtual ~NotOnSurfaceException() throw();
-
-  virtual const char* what() const throw();
-};
-
-#endif /* NOTONSURFACEEXCEPTION_HPP_ */
Index: c/Exceptions/ShapeException.cpp
===================================================================
--- src/Exceptions/ShapeException.cpp	(revision b88fe4cde25eb17a90126edc680f80f5b35c49c9)
+++ 	(revision )
@@ -1,22 +1,0 @@
-/*
- * ShapeException.cpp
- *
- *  Created on: Jul 14, 2010
- *      Author: crueger
- */
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "CodePatterns/MemDebug.hpp"
-
-#include "ShapeException.hpp"
-
-ShapeException::ShapeException(std::string file, int line) :
-  CustomException(file,line)
-{}
-
-ShapeException::~ShapeException() throw ()
-{}
Index: c/Exceptions/ShapeException.hpp
===================================================================
--- src/Exceptions/ShapeException.hpp	(revision b88fe4cde25eb17a90126edc680f80f5b35c49c9)
+++ 	(revision )
@@ -1,26 +1,0 @@
-/*
- * ShapeException.hpp
- *
- *  Created on: Jul 14, 2010
- *      Author: crueger
- */
-
-#ifndef SHAPEEXCEPTION_HPP_
-#define SHAPEEXCEPTION_HPP_
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-
-#include "Exceptions/CustomException.hpp"
-
-class ShapeException : public CustomException
-{
-public:
-  ShapeException(std::string file, int line);
-  virtual ~ShapeException() throw();
-};
-
-#endif /* SHAPEEXCEPTION_HPP_ */
Index: src/Shapes/BaseShapes.cpp
===================================================================
--- src/Shapes/BaseShapes.cpp	(revision b88fe4cde25eb17a90126edc680f80f5b35c49c9)
+++ src/Shapes/BaseShapes.cpp	(revision b94634903469fbb4f8f27672f141d13d2700a169)
@@ -22,4 +22,5 @@
 #include "Shapes/BaseShapes.hpp"
 #include "Shapes/BaseShapes_impl.hpp"
+#include "Shapes/ShapeExceptions.hpp"
 #include "Shapes/ShapeOps.hpp"
 
@@ -46,5 +47,5 @@
 Vector Sphere_impl::getNormal(const Vector &point) throw(NotOnSurfaceException){
   if(!isOnSurface(point)){
-    throw NotOnSurfaceException(__FILE__,__LINE__);
+    throw NotOnSurfaceException() << ShapeVector(&point);
   }
   return point;
@@ -122,5 +123,5 @@
 Vector Cuboid_impl::getNormal(const Vector &point) throw(NotOnSurfaceException){
   if(!isOnSurface(point)){
-    throw NotOnSurfaceException(__FILE__,__LINE__);
+    throw NotOnSurfaceException() << ShapeVector(&point);
   }
   Vector res;
Index: src/Shapes/BaseShapes_impl.hpp
===================================================================
--- src/Shapes/BaseShapes_impl.hpp	(revision b88fe4cde25eb17a90126edc680f80f5b35c49c9)
+++ src/Shapes/BaseShapes_impl.hpp	(revision b94634903469fbb4f8f27672f141d13d2700a169)
@@ -19,4 +19,5 @@
 
 #include "Shapes/Shape_impl.hpp"
+#include "Shapes/ShapeExceptions.hpp"
 
 class Sphere_impl : public Shape_impl {
Index: src/Shapes/Shape.cpp
===================================================================
--- src/Shapes/Shape.cpp	(revision b88fe4cde25eb17a90126edc680f80f5b35c49c9)
+++ src/Shapes/Shape.cpp	(revision b94634903469fbb4f8f27672f141d13d2700a169)
@@ -23,6 +23,7 @@
 #include "LinearAlgebra/Vector.hpp"
 
-#include "Shape.hpp"
-#include "Shape_impl.hpp"
+#include "Shapes/Shape.hpp"
+#include "Shapes/Shape_impl.hpp"
+#include "Shapes/ShapeExceptions.hpp"
 
 #include <string>
@@ -140,5 +141,5 @@
   Vector res;
   if(!isOnSurface(point)){
-    throw NotOnSurfaceException(__FILE__,__LINE__);
+    throw NotOnSurfaceException() << ShapeVector(&point);
   }
   res += lhs->isOnSurface(point)?lhs->getNormal(point):zeroVec;
@@ -226,5 +227,5 @@
   Vector res;
   if(!isOnSurface(point)){
-    throw NotOnSurfaceException(__FILE__,__LINE__);
+    throw NotOnSurfaceException() << ShapeVector(&point);
   }
   res += lhs->isOnSurface(point)?lhs->getNormal(point):zeroVec;
@@ -281,5 +282,5 @@
 
 Vector NotShape_impl::getNormal(const Vector &point) throw(NotOnSurfaceException){
-  return -1*arg->getNormal(point);
+  return -1.*arg->getNormal(point);
 }
 
Index: src/Shapes/Shape.hpp
===================================================================
--- src/Shapes/Shape.hpp	(revision b88fe4cde25eb17a90126edc680f80f5b35c49c9)
+++ src/Shapes/Shape.hpp	(revision b94634903469fbb4f8f27672f141d13d2700a169)
@@ -18,5 +18,5 @@
 #include <iosfwd>
 
-#include "Exceptions/NotOnSurfaceException.hpp"
+#include "Shapes/ShapeExceptions.hpp"
 
 #include <vector>
Index: src/Shapes/ShapeExceptions.hpp
===================================================================
--- src/Shapes/ShapeExceptions.hpp	(revision b94634903469fbb4f8f27672f141d13d2700a169)
+++ src/Shapes/ShapeExceptions.hpp	(revision b94634903469fbb4f8f27672f141d13d2700a169)
@@ -0,0 +1,40 @@
+/*
+ * ShapeExceptions.hpp
+ *
+ *  Created on: Apr 1, 2011
+ *      Author: heber
+ */
+
+#ifndef SHAPEEXCEPTIONS_HPP_
+#define SHAPEEXCEPTIONS_HPP_
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <exception>
+#include <boost/exception.hpp>
+
+class Vector;
+
+/** Base type for all exceptions regarding linear algebra.
+ *
+ */
+struct ShapeException : virtual std::exception, virtual boost::exception { };
+
+/** ========================== General error information ================== */
+
+/** Exception information for LinearAlgebraException: determinant.
+ */
+typedef boost::error_info<struct tag_ShapeVector, const Vector * const> ShapeVector;
+
+
+/** ============================ Specific exceptions ====================== */
+
+/** Exception thrown when two vectors are parallel, i.e. linear dependent.
+ */
+struct NotOnSurfaceException : virtual ShapeException { };
+
+
+#endif /* SHAPEEXCEPTIONS_HPP_ */
Index: src/Shapes/ShapeOps.cpp
===================================================================
--- src/Shapes/ShapeOps.cpp	(revision b88fe4cde25eb17a90126edc680f80f5b35c49c9)
+++ src/Shapes/ShapeOps.cpp	(revision b94634903469fbb4f8f27672f141d13d2700a169)
@@ -20,4 +20,5 @@
 #include "CodePatterns/MemDebug.hpp"
 
+#include "Shapes/ShapeExceptions.hpp"
 #include "Shapes/ShapeOps.hpp"
 #include "Shapes/ShapeOps_impl.hpp"
@@ -44,5 +45,5 @@
   Vector helper = translateIn(point);
   if(!arg->isOnSurface(helper)){
-    throw NotOnSurfaceException(__FILE__,__LINE__);
+    throw NotOnSurfaceException() << ShapeVector(&helper);
   }
   Vector res = translateOutNormal(arg->getNormal(helper));
Index: src/Shapes/ShapeOps_impl.hpp
===================================================================
--- src/Shapes/ShapeOps_impl.hpp	(revision b88fe4cde25eb17a90126edc680f80f5b35c49c9)
+++ src/Shapes/ShapeOps_impl.hpp	(revision b94634903469fbb4f8f27672f141d13d2700a169)
@@ -16,4 +16,5 @@
 
 #include "Shapes/Shape_impl.hpp"
+#include "Shapes/ShapeExceptions.hpp"
 #include "LinearAlgebra/Vector.hpp"
 #include "LinearAlgebra/RealSpaceMatrix.hpp"
Index: src/Shapes/Shape_impl.hpp
===================================================================
--- src/Shapes/Shape_impl.hpp	(revision b88fe4cde25eb17a90126edc680f80f5b35c49c9)
+++ src/Shapes/Shape_impl.hpp	(revision b94634903469fbb4f8f27672f141d13d2700a169)
@@ -18,4 +18,5 @@
 
 #include "Shapes/Shape.hpp"
+#include "Shapes/ShapeExceptions.hpp"
 #include "LinearAlgebra/Line.hpp"
 #include "LinearAlgebra/LineSegment.hpp"
@@ -45,5 +46,5 @@
   }
   virtual Vector getNormal(const Vector &point) throw(NotOnSurfaceException){
-    throw NotOnSurfaceException(__FILE__,__LINE__);
+    throw NotOnSurfaceException() << ShapeVector(&point);
   }
   virtual LineSegmentSet getLineIntersections(const Line &line){
@@ -69,5 +70,5 @@
   }
   virtual Vector getNormal(const Vector &point) throw(NotOnSurfaceException){
-    throw NotOnSurfaceException(__FILE__,__LINE__);
+    throw NotOnSurfaceException() << ShapeVector(&point);
   }
   virtual LineSegmentSet getLineIntersections(const Line &line){
