-void __catch_exception( void * e, const char * function, const char * file, int line_number )
-{
- libvlc_exception_t * ex = (libvlc_exception_t *)e;
- if( libvlc_exception_raised( ex ) )
- {
- NSException* libvlcException = [NSException
- exceptionWithName:@"LibVLCException"
- reason:[NSString stringWithFormat:@"libvlc has thrown us an error: %s (%s:%d %s)",
- libvlc_errmsg(), file, line_number, function]
- userInfo:nil];
- libvlc_exception_clear( ex );
- @throw libvlcException;
- }
-}
-