Fix to AsyncRequest - After an update a while ago, Relay exceptions stopped getting the extra call stacks that the AsyncRequest maintains, since something on the service side of things handles exceptions on its own. This switches the logging a bit to ensure call stacks for our code are presented.
ExceptioneFull=newException($"Call stack before async call:\n{currentTrace}\n",e);// TODO: Are we still missing Relay exceptions after the update?
throweFull;
UnityEngine.Debug.LogError($"AsyncRequest threw an exception. Call stack before async call:\n{currentTrace}\n");// Note that we log here instead of creating a new Exception in case of a change in calling context during the async call. E.g. Relay has its own exception handling that would intercept this call stack.
throw;
}
finally
{onComplete?.Invoke();
catch(Exceptione)
{
ParseServiceException(e);
ExceptioneFull=newException($"Call stack before async call:\n{currentTrace}\n",e);
throweFull;
UnityEngine.Debug.LogError($"AsyncRequest threw an exception. Call stack before async call:\n{currentTrace}\n");