Commit 24eff5c2 authored by Wilko Manger's avatar Wilko Manger

Improve error logging in debug mode

parent 27d8520f
......@@ -32,6 +32,15 @@ SentryClient _sentry;
Future<void> _reportError(dynamic error, dynamic stackTrace) async {
print('Caught error: $error');
if (_isInDebugMode) {
if (error is Response) {
print('statusCode: ${error.statusCode}');
print('headers: ${error.headers}');
print('body: ${error.body}');
} else if (error is matrix.MatrixException) {
print('body: ${error.body}');
}
print(stackTrace);
} else {
if (error is Response) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment