]> git.sesse.net Git - vlc/blobdiff - projects/mozilla/control/npolibvlc.cpp
libvlc_audio_*: remove useless exception parameters
[vlc] / projects / mozilla / control / npolibvlc.cpp
index f92e8c46a900121f1b943b5136f86328d2ae26a7..ae53301b5bb17d1bfe4f1d36c6b0c05f488fdbd1 100644 (file)
@@ -42,7 +42,7 @@
 #define RETURN_ON_EXCEPTION(this,ex) \
     do { if( libvlc_exception_raised(&ex) ) \
     { \
-        NPN_SetException(this, libvlc_exception_get_message(&ex)); \
+        NPN_SetException(this, libvlc_errmsg()); \
         libvlc_exception_clear(&ex); \
         return INVOKERESULT_GENERIC_ERROR; \
     } } while(false)
@@ -225,8 +225,7 @@ LibvlcAudioNPObject::getProperty(int index, NPVariant &result)
             }
             case ID_audio_volume:
             {
-                int volume = libvlc_audio_get_volume(p_plugin->getVLC(), &ex);
-                RETURN_ON_EXCEPTION(this,ex);
+                int volume = libvlc_audio_get_volume(p_plugin->getVLC());
                 INT32_TO_NPVARIANT(volume, result);
                 return INVOKERESULT_NO_ERROR;
             }
@@ -280,8 +279,7 @@ LibvlcAudioNPObject::setProperty(int index, const NPVariant &value)
                 if( NPVARIANT_IS_BOOLEAN(value) )
                 {
                     libvlc_audio_set_mute(p_plugin->getVLC(),
-                                          NPVARIANT_TO_BOOLEAN(value), &ex);
-                    RETURN_ON_EXCEPTION(this,ex);
+                                          NPVARIANT_TO_BOOLEAN(value));
                     return INVOKERESULT_NO_ERROR;
                 }
                 return INVOKERESULT_INVALID_VALUE;
@@ -349,8 +347,7 @@ LibvlcAudioNPObject::invoke(int index, const NPVariant *args,
             case ID_audio_togglemute:
                 if( argCount == 0 )
                 {
-                    libvlc_audio_toggle_mute(p_plugin->getVLC(), &ex);
-                    RETURN_ON_EXCEPTION(this,ex);
+                    libvlc_audio_toggle_mute(p_plugin->getVLC());
                     VOID_TO_NPVARIANT(result);
                     return INVOKERESULT_NO_ERROR;
                 }
@@ -448,7 +445,7 @@ LibvlcInputNPObject::getProperty(int index, NPVariant &result)
         {
             if( index != ID_input_state )
             {
-                NPN_SetException(this, libvlc_exception_get_message(&ex));
+                NPN_SetException(this, libvlc_errmsg());
                 libvlc_exception_clear(&ex);
                 return INVOKERESULT_GENERIC_ERROR;
             }