c# - How to create Exception instance in C#?
问题描述
I'm upgrading Crashlytics sdk from Fabric to Firebase for Unity3d project and trying to adapt api-changing for exceptions catching.
I need to construct Exception instance from next arguments:
void OnLogMessageReceived(String log, String stackTrace, LogType type)
Now I have
Crashlytics.Log(log);
Crashlytics.Log(stackTrace);
Exception exception = new Exception(type);
Crashlytics.LogException(exception);
Is it possible to send stackTrace
and get it pretty structured like it was in Fabric?
解决方案
This is Zubair from Fabric/Firebase. With the release of Firebase Crashlytics for Unity, Developers already using the Fabric Crashlytics SDK might need to make some minor changes to their code when upgrading to Firebase Crashlytics. This guide will provide details on the specific changes to the API, the reason for the change, and helpful suggestions where workarounds are required.
推荐阅读
- r - R Dplyr 中的多个选择语句
- excel - 你能帮我做一个数字转换表吗?
- python - 在迭代同一数组时将值附加到 Numpy 数组
- docker - docker swarm 配置中的自动工作者重启问题
- html - Materialize CSS 阻止 Textarea 内容因页面高度增加而溢出
- python-3.x - 回文问题 - 尝试检查 2 个列表是否相等 python3.9
- javascript - 我在 javascript 文件中的 php echo 中收到错误
- mysql - 尝试在 Sql 中设置月份和日期两位数
- html - 我如何让这两个图像并排显示 HTML / CSS
- javascript - 为什么我的对象不断获得 NaN 值?