Add exception handling in src/wrapper/Visualization/Visualization.i

Remove detection of the CSF_GraphicShr environment variable, this is no more needed.

diff --git a/src/addons/Display/OCCViewer.py b/src/addons/Display/OCCViewer.py
index ee43485..7c637d2 100644
--- a/src/addons/Display/OCCViewer.py
+++ b/src/addons/Display/OCCViewer.py
@@ -66,10 +66,6 @@ class BaseDriver(object):
         self._window_handle = window_handle
         
     def Create(self):
-        try:
-            os.environ["CSF_GraphicShr"]
-        except KeyError:
-            raise "Please set the CSF_GraphicShr environment variable."
         if sys.platform!='win32':
             try:
                 os.environ['DISPLAY']
diff --git a/src/addons/Display/qtDisplay.py b/src/addons/Display/qtDisplay.py
index 5e74cf3..f6e47fb 100644
--- a/src/addons/Display/qtDisplay.py
+++ b/src/addons/Display/qtDisplay.py
@@ -60,10 +60,6 @@ class qtViewer2d(qtBaseViewer):
         print "qtViewer2d inited"
     
     def InitDriver(self):
-        try:
-            os.environ["CSF_GraphicShr"]
-        except KeyError:
-            raise "Please set the CSF_GraphicShr environment variable."
         self._display = OCCViewer.Viewer2d(self.GetHandle())
         self._display.Create()
         self._inited = True
@@ -87,10 +83,6 @@ class qtNISViewer3d(qtBaseViewer):
         self._selection = None
 
     def InitDriver(self):
-        try:
-            os.environ["CSF_GraphicShr"]
-        except KeyError:
-            raise "Please set the CSF_GraphicShr environment variable."
         self._display = OCCViewer.NISViewer3d(self.GetHandle())
         self._display.Create()
         self._inited = True
@@ -109,10 +101,6 @@ class qtViewer3d(qtBaseViewer):
         self._selection = None
 
     def InitDriver(self):
-        try:
-            os.environ["CSF_GraphicShr"]
-        except KeyError:
-            raise "Please set the CSF_GraphicShr environment variable."
         self._display = OCCViewer.Viewer3d(self.GetHandle())
         self._display.Create()
         self._display.DisplayTriedron()
diff --git a/src/addons/Display/wxDisplay.py b/src/addons/Display/wxDisplay.py
index 9e58663..2de4fb8 100644
--- a/src/addons/Display/wxDisplay.py
+++ b/src/addons/Display/wxDisplay.py
@@ -90,10 +90,6 @@ class wxViewer2d(wxBaseViewer):
         """
         This method is called after __init__ in the wxBaseViewer class
         """
-        try:
-            os.environ["CSF_GraphicShr"]
-        except KeyError:
-            raise "Please set the CSF_GraphicShr environment variable."
         self._display = OCCViewer.Viewer2d(self.GetHandle())
         self._display.Create()
         self._inited = True
@@ -121,10 +117,6 @@ class wxNISViewer3d(wxBaseViewer):
         self._selection = None
 
     def InitDriver(self):
-        try:
-            os.environ["CSF_GraphicShr"]
-        except KeyError:
-            raise "Please set the CSF_GraphicShr environment variable."
         self._display = OCCViewer.NISViewer3d(self.GetHandle())
         self._display.Create()
         #self._display.DisplayTriedron()
@@ -147,10 +139,6 @@ class wxViewer3d(wxBaseViewer):
         self._selection = None
 
     def InitDriver(self):
-        try:
-            os.environ["CSF_GraphicShr"]
-        except KeyError:
-            raise "Please set the CSF_GraphicShr environment variable."
         self._display = OCCViewer.Viewer3d(self.GetHandle())
         self._display.Create()
         self._display.DisplayTriedron()
diff --git a/src/wrapper/Visualization/Visualization.i b/src/wrapper/Visualization/Visualization.i
index cc170ca..2ff0d49 100644
--- a/src/wrapper/Visualization/Visualization.i
+++ b/src/wrapper/Visualization/Visualization.i
@@ -20,8 +20,21 @@
 
 %{
 #include <Visualization.h>
+#include <Standard_ErrorHandler.hxx>
+#include <Standard_Failure.hxx>
 %}
 
+%exception Init {
+	try {
+		OCC_CATCH_SIGNALS
+		$action
+	} catch (Standard_Failure) {
+		Handle(Standard_Failure) error = Standard_Failure::Caught ();
+		PyErr_SetString(PyExc_RuntimeError, error->GetMessageString());
+		return NULL;
+	}
+}
+
 class Display2d {
  public:
 	%feature("autodoc", "1");
