Hi,
I have a number of C# host objects added into the engine.
In case of exception within C#, the exception caught in the javascript has message as "Exception has been thrown by the target of an invocation" and type as object. Here is the sample code:
_try
{
catch(err)
{
httpclient and Log are my host objects here.
I tried adding the expected exception type as hosttype but still its the same.
Is there any better way to handle this ?
I need to know the actual type or message. Looks like the whole exception object is getting lost due to a re-throw like scenario?
I have a number of C# host objects added into the engine.
In case of exception within C#, the exception caught in the javascript has message as "Exception has been thrown by the target of an invocation" and type as object. Here is the sample code:
_try
{
loginResponse = httpclient.Post(authUri,JSON.stringify(loginInfo), '', '', 'application/json');
}catch(err)
{
Log.Error('err message...' + err.message);
var type = typeof err;
Log.Info('Exception returned type - ' + type);
}_httpclient and Log are my host objects here.
I tried adding the expected exception type as hosttype but still its the same.
Is there any better way to handle this ?
I need to know the actual type or message. Looks like the whole exception object is getting lost due to a re-throw like scenario?