diff --git a/samples/grab.py b/samples/grab.py index 67d9ab7..5efa7c8 100644 --- a/samples/grab.py +++ b/samples/grab.py @@ -65,7 +65,7 @@ except genicam.GenericException as e: # Error handling. print("An exception occurred.") - print(e.GetDescription()) + print(e) exitCode = 1 sys.exit(exitCode) diff --git a/samples/grabcameraevents.py b/samples/grabcameraevents.py index 7cf34a5..b611529 100644 --- a/samples/grabcameraevents.py +++ b/samples/grabcameraevents.py @@ -142,4 +142,4 @@ def OnImageGrabbed(self, camera, grabResult): except genicam.GenericException as e: # Error handling. - print("An exception occurred.", e.GetDescription()) + print("An exception occurred.", e) diff --git a/samples/grabchunkimage.py b/samples/grabchunkimage.py index 3ddf009..3d9727e 100644 --- a/samples/grabchunkimage.py +++ b/samples/grabchunkimage.py @@ -131,5 +131,5 @@ def OnImageGrabbed(self, camera, grabResult): except genicam.GenericException as e: # Error handling. - print("An exception occurred.", e.GetDescription()) + print("An exception occurred.", e) exitCode = 1 diff --git a/samples/grabmultiplecameras.py b/samples/grabmultiplecameras.py index b29e714..1e06858 100644 --- a/samples/grabmultiplecameras.py +++ b/samples/grabmultiplecameras.py @@ -93,7 +93,7 @@ except genicam.GenericException as e: # Error handling - print("An exception occurred.", e.GetDescription()) + print("An exception occurred.", e) exitCode = 1 # Comment the following two lines to disable waiting on exit. diff --git a/samples/grabusinggrabloopthread.py b/samples/grabusinggrabloopthread.py index 1967ea2..e45b32c 100644 --- a/samples/grabusinggrabloopthread.py +++ b/samples/grabusinggrabloopthread.py @@ -65,4 +65,4 @@ def OnImageGrabbed(self, camera, grabResult): break except genicam.GenericException as e: # Error handling. - print("An exception occurred.", e.GetDescription()) + print("An exception occurred.", e) diff --git a/samples/guiimagewindow.py b/samples/guiimagewindow.py index be223ef..30e5d2d 100644 --- a/samples/guiimagewindow.py +++ b/samples/guiimagewindow.py @@ -41,4 +41,4 @@ except genicam.GenericException as e: # Error handling. print("An exception occurred.") - print(e.GetDescription()) + print(e) diff --git a/samples/helloworld.py b/samples/helloworld.py index f08f019..be086e2 100644 --- a/samples/helloworld.py +++ b/samples/helloworld.py @@ -32,7 +32,7 @@ def main(): return 0 except genicam.GenericException as e: - print("Error ", e.GetDescription()) + print("Error ", e) return -1 diff --git a/samples/startup.py b/samples/startup.py index 98c0d45..1aed990 100644 --- a/samples/startup.py +++ b/samples/startup.py @@ -53,6 +53,6 @@ except genicam.GenericException as e: # Error handling. - print("An exception occurred.", e.GetDescription()) + print("An exception occurred.", e) camera.Close() diff --git a/samples/utilityimageformatconverter.py b/samples/utilityimageformatconverter.py index 5856d53..e0817aa 100644 --- a/samples/utilityimageformatconverter.py +++ b/samples/utilityimageformatconverter.py @@ -54,6 +54,6 @@ def show_image(image, message): targetImage.Save(pylon.ImageFileFormat_Png, filename) except genicam.GenericException as e: - print("Could not grab an image: ", e.GetDescription()) + print("Could not grab an image: ", e) except genicam.GenericException as e: - print("An exception occurred. ", e.GetDescription()) + print("An exception occurred. ", e) diff --git a/samples/utilityimageformatconverter1.py b/samples/utilityimageformatconverter1.py index 71592f0..1d5168a 100644 --- a/samples/utilityimageformatconverter1.py +++ b/samples/utilityimageformatconverter1.py @@ -36,7 +36,7 @@ def grab_image(): camera.Close() return result except genicam.GenericException as e: - print("Could not grab an image: ", e.GetDescription()) + print("Could not grab an image: ", e) try: @@ -67,4 +67,4 @@ def grab_image(): target_image = converter.Convert(image) show_image(target_image, "Converted image.") except genicam.GenericException as e: - print("An exception occurred. ", e.GetDescription()) + print("An exception occurred. ", e)