Пример #1
0
    def ui_syntax_error(self):
        try:
            ex_handler = None
            eval('import foo')

        except:
            ex_handler = ExceptionHandler(message='Trouble with your source.')
            ex_handler.configure_traits()
Пример #2
0
    def ui_file_not_found(self):
        try:
            ex_handler = None
            file('foo.bar', 'rb')

        except:
            ex_handler = ExceptionHandler(message='Unable to find your file.')
            ex_handler.configure_traits()
Пример #3
0
    def ui_syntax_error(self):
        try:
            ex_handler = None
            eval('import foo')

        except:
            ex_handler = ExceptionHandler(message='Trouble with your source.')
            ex_handler.configure_traits()
Пример #4
0
    def ui_file_not_found(self):
        try:
            ex_handler = None
            file('foo.bar', 'rb')

        except:
            ex_handler = ExceptionHandler(message='Unable to find your file.')
            ex_handler.configure_traits()
Пример #5
0
    def ui_simple_dialog(self):
        try:
            ex_handler = None
            raise Exception, 'test exception'

        except:
            ex_handler = ExceptionHandler(message=
                                          'Your application message here!')
            ex_handler.configure_traits()
Пример #6
0
    def ui_simple_dialog(self):
        try:
            ex_handler = None
            raise Exception, 'test exception'

        except:
            ex_handler = ExceptionHandler(
                message='Your application message here!')
            ex_handler.configure_traits()