例如云引擎中raise了exception:
raise LeanEngineError(123, '文本内容1')
或者
raise LeanEngineError(message = '文本内容2')
请问在unity中如何显示文本内容1、文本内容2?
在unity中的代码:
gameScore.SaveAsync().ContinueWith(t =>
{
if (!t.IsFaulted)
{
print("成功!!");
}
else
{
print("失败!!");
print("t.Exception.Message = " + t.Exception.Message);
Debug.LogException(t.Exception);
}
});
运行后在unity的日志中的消息:
失败!!
UnityEngine.MonoBehaviour:print(Object)
AVOSCloudTest:<TestSave>m__2(Task) (at Assets/Scripts/Testing/AVOSCloudTest.cs:30)
System.Threading.Tasks.<Post>c__AnonStorey50:<>m__EE(Object)
t.Exception.Message = Exception of type 'System.AggregateException' was thrown.
UnityEngine.MonoBehaviour:print(Object)
AVOSCloudTest:<TestSave>m__2(Task) (at Assets/Scripts/Testing/AVOSCloudTest.cs:31)
System.Threading.Tasks.<Post>c__AnonStorey50:<>m__EE(Object)
-
创建时间
16年8月19日
-
最后回复
16年8月25日
-
1
回复
-
789
浏览
-
2
用户