Skip to content
Snippets Groups Projects
Commit d6331244 authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

Fix an issue where minor issues caused crash reports to be written

parent d4636524
Branches
No related tags found
No related merge requests found
...@@ -43,6 +43,8 @@ abstract class ProtocolHandler( ...@@ -43,6 +43,8 @@ abstract class ProtocolHandler(
if (!super<SignalProxy>.handle(f)) { if (!super<SignalProxy>.handle(f)) {
log(DEBUG, "ProtocolHandler", "No receiver registered for $f") log(DEBUG, "ProtocolHandler", "No receiver registered for $f")
} }
} catch (e: ObjectNotFoundException) {
log(DEBUG, "ProtocolHandler", "An error has occured while processing $f", e)
} catch (e: Throwable) { } catch (e: Throwable) {
exceptionHandler.invoke(MessageHandlingException.SignalProxy(f, e)) exceptionHandler.invoke(MessageHandlingException.SignalProxy(f, e))
} }
...@@ -56,6 +58,8 @@ abstract class ProtocolHandler( ...@@ -56,6 +58,8 @@ abstract class ProtocolHandler(
if (!super<AuthHandler>.handle(f)) { if (!super<AuthHandler>.handle(f)) {
log(DEBUG, "ProtocolHandler", "No receiver registered for $f") log(DEBUG, "ProtocolHandler", "No receiver registered for $f")
} }
} catch (e: ObjectNotFoundException) {
log(DEBUG, "ProtocolHandler", "An error has occured while processing $f", e)
} catch (e: Throwable) { } catch (e: Throwable) {
exceptionHandler.invoke(MessageHandlingException.Handshake(f, e)) exceptionHandler.invoke(MessageHandlingException.Handshake(f, e))
} }
......
...@@ -60,9 +60,9 @@ object CrashHandler { ...@@ -60,9 +60,9 @@ object CrashHandler {
crashFile.writeText(json) crashFile.writeText(json)
Log.e("Malheur", "Crash report saved: $crashFile", throwable) Log.e("Malheur", "Crash report saved: $crashFile", throwable)
handler.post { handler.post {
Toast.makeText(application, Toast.makeText(
"Crash report saved: ${crashFile.name}", application, "Crash report saved: ${crashFile.name}", Toast.LENGTH_LONG
Toast.LENGTH_LONG).show() ).show()
} }
} catch (e: Throwable) { } catch (e: Throwable) {
e.printStackTrace() e.printStackTrace()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment