Send crash notification when flipper cpp exceptions are suppressed
Summary: This diff adds support to send crash notification whenever the cpp exception of Flipper is suppressed. Also updated the tests regarding the same Reviewed By: jknoxville Differential Revision: D13635822 fbshipit-source-id: 01e4a57c391476e5b044e64946d337cb4582a527
This commit is contained in:
committed by
Facebook Github Bot
parent
944a197cf6
commit
87f64c4535
@@ -1,9 +1,8 @@
|
||||
/*
|
||||
* Copyright (c) Facebook, Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the LICENSE
|
||||
* file in the root directory of this source tree.
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the LICENSE
|
||||
* file in the root directory of this source tree.
|
||||
*/
|
||||
#include <Flipper/FlipperClient.h>
|
||||
#include <FlipperTestLib/FlipperConnectionManagerMock.h>
|
||||
@@ -282,10 +281,12 @@ TEST(FlipperClientTests, testExceptionUnknownPlugin) {
|
||||
dynamic messageInit = dynamic::object("method", "init")(
|
||||
"params", dynamic::object("plugin", "Unknown"));
|
||||
socket->callbacks->onMessageReceived(messageInit);
|
||||
|
||||
EXPECT_EQ(
|
||||
socket->messages.back()["error"]["message"],
|
||||
"plugin Unknown not found for method init");
|
||||
EXPECT_EQ(
|
||||
socket->messages.back()["error"]["name"],
|
||||
"plugin Unknown not found for method init");
|
||||
}
|
||||
|
||||
TEST(FlipperClientTests, testExceptionUnknownApi) {
|
||||
@@ -297,10 +298,12 @@ TEST(FlipperClientTests, testExceptionUnknownApi) {
|
||||
dynamic messageInit = dynamic::object("method", "execute")(
|
||||
"params", dynamic::object("api", "Unknown"));
|
||||
socket->callbacks->onMessageReceived(messageInit);
|
||||
|
||||
EXPECT_EQ(
|
||||
socket->messages.back()["error"]["message"],
|
||||
"connection Unknown not found for method execute");
|
||||
EXPECT_EQ(
|
||||
socket->messages.back()["error"]["name"],
|
||||
"connection Unknown not found for method execute");
|
||||
}
|
||||
|
||||
TEST(FlipperClientTests, testBackgroundPluginActivated) {
|
||||
|
||||
Reference in New Issue
Block a user