This project has moved. For the latest updates, please go here.

ImportErrors not handled with General Error Handler

Apr 2, 2014 at 6:48 PM
I have noticed an AttributeError not being handled by the "popup" error handler. This, instead of breaking in my code breaks outside of the Debugging loop and means tracking it down the old fashioned way, and going to the line number.

The following showed up in a floating command prompt window.
Traceback (most recent call last):
  File "D:\projects\ctg\main\ctg\src\tools\Exporter\", line 33, in <module>
    import core.config
  File ".\core\", line 44, in <module>
    class Base_Exporter_Config( object ):
  File ".\core\", line 97, in Base_Exporter_Config
    source_data_manager = core.exporter.Source_Data_Manager( core.exporter.Exportable_Manager )
AttributeError: 'module' object has no attribute 'exporter'
The error is that I did not import the module properly, and easy to solve.

To test unHandled Errors I did a test with:
x = 10 / 0.0
That broke in the IDE with the Error Handling Window present.
Apr 2, 2014 at 7:00 PM
It's simply set to not break by default - you can change this in Debug -> Exceptions. Same thing goes for some others like IndexError or StopIteration - basically, the ones that are routine on regular non-error execution paths.
Marked as answer by astral451 on 4/2/2014 at 12:22 PM
Apr 2, 2014 at 7:22 PM
Having little experience with VS, I did not know about this feature. Thank you.