Fix the callstack sent from error reporting runnable
Summary:
The crash logged from `ErrorReporterRunnable` wasn't detailed. For example look at the following video.
Also for some reason the `FlipperConnection` interface doesn't have an argument for crash name. Thus I changed the js side of the plugin to accept `crash.name` to be undefined.
{F155526537}
Reviewed By: passy
Differential Revision: D14852561
fbshipit-source-id: 6daf9847535b4508fa312b4f940b014911aae2e5
This commit is contained in:
committed by
Facebook Github Bot
parent
9e4a9607b5
commit
5169d318de
@@ -153,10 +153,13 @@ class JFlipperConnectionImpl : public jni::HybridClass<JFlipperConnectionImpl, J
|
||||
|
||||
static void registerNatives() {
|
||||
registerHybrid({
|
||||
makeNativeMethod("sendObject", JFlipperConnectionImpl::sendObject),
|
||||
makeNativeMethod("sendArray", JFlipperConnectionImpl::sendArray),
|
||||
makeNativeMethod("reportError", JFlipperConnectionImpl::reportError),
|
||||
makeNativeMethod("receive", JFlipperConnectionImpl::receive),
|
||||
makeNativeMethod("sendObject", JFlipperConnectionImpl::sendObject),
|
||||
makeNativeMethod("sendArray", JFlipperConnectionImpl::sendArray),
|
||||
makeNativeMethod("reportError", JFlipperConnectionImpl::reportError),
|
||||
makeNativeMethod(
|
||||
"reportErrorWithMetadata",
|
||||
JFlipperConnectionImpl::reportErrorWithMetadata),
|
||||
makeNativeMethod("receive", JFlipperConnectionImpl::receive),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -168,8 +171,15 @@ class JFlipperConnectionImpl : public jni::HybridClass<JFlipperConnectionImpl, J
|
||||
_connection->send(std::move(method), json ? folly::parseJson(json->toJsonString()) : folly::dynamic::object());
|
||||
}
|
||||
|
||||
void reportErrorWithMetadata(
|
||||
const std::string reason,
|
||||
const std::string stackTrace) {
|
||||
_connection->error(reason, stackTrace);
|
||||
}
|
||||
|
||||
void reportError(jni::alias_ref<jni::JThrowable> throwable) {
|
||||
_connection->error(throwable->toString(), throwable->getStackTrace()->toString());
|
||||
_connection->error(
|
||||
throwable->toString(), throwable->getStackTrace()->toString());
|
||||
}
|
||||
|
||||
void receive(const std::string method, jni::alias_ref<JFlipperReceiver> receiver) {
|
||||
|
||||
Reference in New Issue
Block a user