]> git.sesse.net Git - vlc/commitdiff
removed unused exceptions
authorToralf Niebuhr <gmthor85@aim.com>
Sun, 7 Feb 2010 13:01:41 +0000 (14:01 +0100)
committerFelix Paul Kühne <fkuehne@videolan.org>
Mon, 8 Feb 2010 18:28:05 +0000 (19:28 +0100)
Signed-off-by: Felix Paul Kühne <fkuehne@videolan.org>
projects/macosx/framework/Sources/VLCLibrary.m
projects/macosx/framework/Sources/VLCMediaLibrary.m
projects/macosx/framework/Sources/VLCMediaListPlayer.m
projects/macosx/framework/Sources/VLCMediaPlayer.m

index 1595dda53fae6fd29ad1511073558192dd0cf18c..4870787316b798e030245745e7ea721dc6e25dd7 100644 (file)
 
 static VLCLibrary * sharedLibrary = nil;
 
-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;
-    }
-}
-
 @implementation VLCLibrary
 + (VLCLibrary *)sharedLibrary
 {
@@ -64,8 +49,6 @@ void __catch_exception( void * e, const char * function, const char * file, int
 {
     if (self = [super init])
     {
-        libvlc_exception_t ex;
-        libvlc_exception_init( &ex );
 
         NSArray *vlcParams = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"VLCParams"];
         if (!vlcParams) {
index ca6a1f165b70dd0cf2a9201edc1bbc3ca37f888f..d3c3786393481d997bc90afd2e6e5c88bdbd242e 100644 (file)
     {
         mlib = libvlc_media_library_new( [VLCLibrary sharedInstance]);
 
-        libvlc_exception_t p_e;
-        libvlc_exception_init( &p_e );
-        libvlc_media_library_load( mlib, &p_e );
-        catch_exception( &p_e );
+        libvlc_media_library_load( mlib );
 
         allMedia = nil;
     }
@@ -70,7 +67,7 @@
 {
     if( !allMedia )
     {
-        libvlc_media_list_t * p_mlist = libvlc_media_library_media_list( mlib, NULL );
+        libvlc_media_list_t * p_mlist = libvlc_media_library_media_list( mlib );
         allMedia = [[VLCMediaList mediaListWithLibVLCMediaList:p_mlist] retain];
         libvlc_media_list_release(p_mlist);
     }
index cf90295c86f97b4e68006708c0816d92d954290f..48c83897726f4383774c54936f087ee18ce2d771 100644 (file)
 
 - (void)playMedia:(VLCMedia *)media
 {
-    libvlc_exception_t ex;
-    libvlc_exception_init(&ex);
     libvlc_media_list_player_play_item(instance, [media libVLCMediaDescriptor]);
-    catch_exception(&ex);
 }
 
 - (void)play
 {
-    libvlc_exception_t ex;
-    libvlc_exception_init(&ex);
     libvlc_media_list_player_play(instance);
-    catch_exception(&ex);
 }
 
 - (void)stop
index 05b641fa8fb86b434fb9a766e402612ccae4769c..44bddacc264afcba5f3374816a436d6aa0d1c95b 100644 (file)
@@ -724,10 +724,7 @@ static const VLCMediaPlayerState libvlc_to_local_state[] =
         // Create a media instance, it doesn't matter what library we start off with
         // it will change depending on the media descriptor provided to the media
         // instance
-        libvlc_exception_t ex;
-        libvlc_exception_init( &ex );
         instance = libvlc_media_player_new([VLCLibrary sharedInstance]);
-        catch_exception( &ex );
 
         [self registerObservers];