Jason Tackaberry wrote:
> Author: tack
> Date: Thu May 21 23:26:48 2009
> New Revision: 4032
>
> Log:
> Remove more catch-all exceptions, as well SystemError and KeyboardInterrupt
> exceptions. kaa.metadata is a library first, and it's not its place to
> enforce
> an exception-handling policy on the caller.
[...]
> return parser(file)
> except core.ParseError:
> pass
> - except (KeyboardInterrupt, SystemExit):
> - # FIXME: kaa.metadata is a library, and it is not its
> place
> - # to institute behaviour on these exceptions. Rather it
> - # should bubble up these exceptions and let the caller
> - # deal with them.
> - sys.exit(0)
> - except:
> - log.exception('parse error')
That is a bad patch. A broken file can now crash beacon. Let us assume a
MPEG-TS file with some wrong bits and I get an IndexError ... beacon
will crash because nothing catches it. A parser can run into any kind of
bug, we _must_ catch all exceptions and try the next parser.
Is there any reason why you want to catch an exception outside?
Dischi
--
A much wittier reply came to mind immediately after I clicked the
'Send' button.
------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com
_______________________________________________
Freevo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-devel