Files
react-native/ReactAndroid/src/main/java/com/facebook/react/common/HasJavascriptExceptionMetadata.java
T
Moti Zilberman 6fb1690de1 Introduce HasJavascriptExceptionMetadata interface
Summary:
@public

Introduces `HasJavascriptExceptionMetadata`, a thin interface to be implemented by all RN (Android) exception classes that represent JavaScript errors (primarily `JavascriptException` and any subclasses).

Also adds a builder-style API for setting the `extraDataAsJson` field on `JavascriptException` instances.

Reviewed By: abhinavbatra

Differential Revision: D16090574

fbshipit-source-id: 427a0d371f1cb4e6fe2e62a91db7857a191fdb8c
2019-07-16 09:38:03 -07:00

17 lines
400 B
Java

/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* <p>This source code is licensed under the MIT license found in the LICENSE file in the root
* directory of this source tree.
*/
package com.facebook.react.common;
import javax.annotation.Nullable;
/** A JS exception carrying metadata. */
public interface HasJavascriptExceptionMetadata {
@Nullable
String getExtraDataAsJson();
}