Re: [Ironpython-users] PINVOKE exception from loaded .NET assembly

2015-11-17 Thread Djordje Spasic via Ironpython-users
Hi Markus, Thank you for the reply. How can I access the inner exception in ironpython? I tried this: import clr clr.AddReferenceToFileAndPath("c:/gdal/gdal2bb/gdal_csharp.dll") import OSGeo.GDAL as gdalc try: gdalc.Gdal.AllRegister() except System.Exception as e: print e.Message But i

Re: [Ironpython-users] PINVOKE exception from loaded .NET assembly

2015-11-17 Thread Djordje Spasic via Ironpython-users
Thank you. I am not a programmer myself. How would either InnerException or AggregateException be used in this case?I tried:try: gdalc.Gdal.AllRegister() except System.AggregateException as e: print "exception: ", e.InnerExceptions   But that didn't seem to be correct. From: Mar

Re: [Ironpython-users] PINVOKE exception from loaded .NET assembly

2015-11-17 Thread Markus Schaber
Hi, The inner exception (if present) can be accessed via the InnerException property of the “outer” exception: https://msdn.microsoft.com/de-de/library/system.exception.innerexception%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396 (This is a .NET feature, not an IronPython specific one.) There

Re: [Ironpython-users] PINVOKE exception from loaded .NET assembly

2015-11-17 Thread Markus Schaber
Hi, it seems, in your case, it’s not an aggregate exception, so you just need to access the InnerException property (without an „s“ at the end) of your System.Exception Best regards Markus Schaber CODESYS® a trademark of 3S-Smart Software Solutions GmbH Inspiring Automation Solutions ___

Re: [Ironpython-users] How to watch the variables(global and local variable) value embedding in c# Code ?

2015-11-17 Thread Ivan Pozdeev via Ironpython-users
Title: Re: [Ironpython-users] How to watch the variables(global and local variable) value embedding in c# Code ? Monday, November 16, 2015, 5:27:47 何游鑫: Hi, I'm using IronPython embedding in vs2012 with c# code. and I need to watch the Var's Value when the script is debugging? is the curr

Re: [Ironpython-users] PINVOKE exception from loaded .NET assembly

2015-11-17 Thread Djordje Spasic via Ironpython-users
That worked perfectly and saved my day. Thank you Markus! Kind regards, Djordje From: Markus Schaber To: Djordje Spasic ; "[email protected]" Sent: Tuesday, November 17, 2015 11:52 AM Subject: RE: [Ironpython-users] PINVOKE exception from loaded .NET assembly #yiv052