#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)
}
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;
}
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;
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;
}
{
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;
}