Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 13 additions & 12 deletions packages/react-native/ReactAndroid/api/ReactAndroid.api
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ public class com/facebook/react/bridge/Arguments {
public static fun toList (Lcom/facebook/react/bridge/ReadableArray;)Ljava/util/ArrayList;
}

public class com/facebook/react/bridge/AssertionException : java/lang/RuntimeException {
public final class com/facebook/react/bridge/AssertionException : java/lang/RuntimeException {
public fun <init> (Ljava/lang/String;)V
}

Expand Down Expand Up @@ -833,7 +833,7 @@ public abstract interface class com/facebook/react/bridge/Inspector$RemoteConnec
public abstract fun onMessage (Ljava/lang/String;)V
}

public class com/facebook/react/bridge/InvalidIteratorException : java/lang/RuntimeException {
public final class com/facebook/react/bridge/InvalidIteratorException : java/lang/RuntimeException {
public fun <init> (Ljava/lang/String;)V
}

Expand All @@ -842,7 +842,7 @@ public class com/facebook/react/bridge/JSApplicationCausedNativeException : java
public fun <init> (Ljava/lang/String;Ljava/lang/Throwable;)V
}

public class com/facebook/react/bridge/JSApplicationIllegalArgumentException : com/facebook/react/bridge/JSApplicationCausedNativeException {
public final class com/facebook/react/bridge/JSApplicationIllegalArgumentException : com/facebook/react/bridge/JSApplicationCausedNativeException {
public fun <init> (Ljava/lang/String;)V
public fun <init> (Ljava/lang/String;Ljava/lang/Throwable;)V
}
Expand Down Expand Up @@ -1082,7 +1082,7 @@ public class com/facebook/react/bridge/NativeModuleRegistry {
public fun onBatchComplete ()V
}

public class com/facebook/react/bridge/NoSuchKeyException : java/lang/RuntimeException {
public final class com/facebook/react/bridge/NoSuchKeyException : java/lang/RuntimeException {
public fun <init> (Ljava/lang/String;)V
}

Expand All @@ -1092,10 +1092,6 @@ public abstract interface class com/facebook/react/bridge/NotThreadSafeBridgeIdl
public abstract fun onTransitionToBridgeIdle ()V
}

public class com/facebook/react/bridge/ObjectAlreadyConsumedException : java/lang/RuntimeException {
public fun <init> (Ljava/lang/String;)V
}

public abstract interface class com/facebook/react/bridge/OnBatchCompleteListener {
public abstract fun onBatchComplete ()V
}
Expand Down Expand Up @@ -1244,11 +1240,16 @@ public class com/facebook/react/bridge/ReactCxxErrorHandler {
public static fun setHandleErrorFunc (Ljava/lang/Object;Ljava/lang/reflect/Method;)V
}

public class com/facebook/react/bridge/ReactIgnorableMountingException : java/lang/RuntimeException {
public final class com/facebook/react/bridge/ReactIgnorableMountingException : java/lang/RuntimeException {
public static final field Companion Lcom/facebook/react/bridge/ReactIgnorableMountingException$Companion;
public fun <init> (Ljava/lang/String;)V
public fun <init> (Ljava/lang/String;Ljava/lang/Throwable;)V
public fun <init> (Ljava/lang/Throwable;)V
public static fun isIgnorable (Ljava/lang/Throwable;)Z
public static final fun isIgnorable (Ljava/lang/Throwable;)Z
}

public final class com/facebook/react/bridge/ReactIgnorableMountingException$Companion {
public final fun isIgnorable (Ljava/lang/Throwable;)Z
}

public class com/facebook/react/bridge/ReactInstanceManagerInspectorTarget : java/lang/AutoCloseable {
Expand Down Expand Up @@ -1425,7 +1426,7 @@ public abstract interface annotation class com/facebook/react/bridge/ReactMethod
public abstract interface class com/facebook/react/bridge/ReactModuleWithSpec {
}

public class com/facebook/react/bridge/ReactNoCrashBridgeNotAllowedSoftException : com/facebook/react/bridge/ReactNoCrashSoftException {
public final class com/facebook/react/bridge/ReactNoCrashBridgeNotAllowedSoftException : com/facebook/react/bridge/ReactNoCrashSoftException {
public fun <init> (Ljava/lang/String;)V
public fun <init> (Ljava/lang/String;Ljava/lang/Throwable;)V
public fun <init> (Ljava/lang/Throwable;)V
Expand Down Expand Up @@ -1542,7 +1543,7 @@ public final class com/facebook/react/bridge/ReadableType : java/lang/Enum {
public static fun values ()[Lcom/facebook/react/bridge/ReadableType;
}

public class com/facebook/react/bridge/RetryableMountingLayerException : java/lang/RuntimeException {
public final class com/facebook/react/bridge/RetryableMountingLayerException : java/lang/RuntimeException {
public fun <init> (Ljava/lang/String;)V
public fun <init> (Ljava/lang/String;Ljava/lang/Throwable;)V
public fun <init> (Ljava/lang/Throwable;)V
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* 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.bridge

/**
* Like [AssertionError] but extends RuntimeException so that it may be caught by a
* [JSExceptionHandler]. See that class for more details. Used in conjunction with [SoftAssertions].
*/
public class AssertionException(message: String) : RuntimeException(message)
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,14 @@
* LICENSE file in the root directory of this source tree.
*/

package com.facebook.react.bridge;
package com.facebook.react.bridge

import com.facebook.proguard.annotations.DoNotStrip;
import com.facebook.proguard.annotations.DoNotStrip

/**
* Exception thrown by {@link ReadableMapKeySetIterator#nextKey()} when the iterator tries to
* iterate over elements after the end of the key set.
*/
@DoNotStrip
public class InvalidIteratorException extends RuntimeException {

@DoNotStrip
public InvalidIteratorException(String msg) {
super(msg);
}
}
public class InvalidIteratorException public @DoNotStrip constructor(msg: String) :
RuntimeException(msg) {}
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

package com.facebook.react.bridge;

import androidx.annotation.Nullable;
package com.facebook.react.bridge

/**
* A special RuntimeException that should be thrown by native code if it has reached an exceptional
Expand All @@ -19,25 +17,18 @@
* this catalyst instance?
*
* <p>Examples where this class is appropriate to throw:
*
* <ul>
* <li>JS tries to update a view with a tag that hasn't been created yet
* <li>JS tries to show a static image that isn't in resources
* <li>JS tries to use an unsupported view class
* <li>JS tries to update a view with a tag that hasn't been created yet
* <li>JS tries to show a static image that isn't in resources
* <li>JS tries to use an unsupported view class
* </ul>
*
* <p>Examples where this class **isn't** appropriate to throw: - Failed to write to localStorage
* because disk is full - Assertions about internal state (e.g. that
* child.getParent().indexOf(child) != -1)
*/
public class JSApplicationCausedNativeException extends RuntimeException {

public JSApplicationCausedNativeException(String detailMessage) {
super(detailMessage);
}
public open class JSApplicationCausedNativeException : RuntimeException {
public constructor(detailMessage: String) : super(detailMessage)

public JSApplicationCausedNativeException(
@Nullable String detailMessage, @Nullable Throwable throwable) {
super(detailMessage, throwable);
}
public constructor(detailMessage: String, throwable: Throwable?) : super(detailMessage, throwable)
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* 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.bridge

/** An illegal argument Exception caused by an argument passed from JS. */
public class JSApplicationIllegalArgumentException : JSApplicationCausedNativeException {

public constructor(detailMessage: String) : super(detailMessage)

public constructor(detailMessage: String, t: Throwable) : super(detailMessage, t)
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* 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.bridge

/** Exception thrown when a native module method call receives unexpected arguments from JS. */
internal class NativeArgumentsParseException : JSApplicationCausedNativeException {

public constructor(detailMessage: String) : super(detailMessage)

public constructor(detailMessage: String, throwable: Throwable?) : super(detailMessage, throwable)
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* 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.bridge

import com.facebook.proguard.annotations.DoNotStrip

/** Exception thrown by [ReadableNativeMap] when a key that does not exist is requested. */
@DoNotStrip
public class NoSuchKeyException @DoNotStrip constructor(msg: String) : RuntimeException(msg)
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,15 @@
* LICENSE file in the root directory of this source tree.
*/

package com.facebook.react.bridge;
package com.facebook.react.bridge

import com.facebook.proguard.annotations.DoNotStrip;
import com.facebook.proguard.annotations.DoNotStrip

/**
* Exception thrown when a caller attempts to modify or use a {@link WritableNativeArray} or {@link
* WritableNativeMap} after it has already been added to a parent array or map. This is unsafe since
* we reuse the native memory so the underlying array/map is no longer valid.
*/
@DoNotStrip
public class ObjectAlreadyConsumedException extends RuntimeException {

@DoNotStrip
public ObjectAlreadyConsumedException(String detailMessage) {
super(detailMessage);
}
}
internal class ObjectAlreadyConsumedException
public @DoNotStrip constructor(detailMessage: String) : RuntimeException(detailMessage) {}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* 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.bridge

/**
* If thrown during a MountItem execution, FabricUIManager will print diagnostics and ignore the
* error. Use this carefully and sparingly!
*/
public class ReactIgnorableMountingException : RuntimeException {

public constructor(m: String) : super(m)

public constructor(e: Throwable) : super(e)

public constructor(m: String, e: Throwable) : super(m, e)

public companion object {
@JvmStatic
public fun isIgnorable(e: Throwable): Boolean {
var cause: Throwable? = e
while (cause != null) {
if (cause is ReactIgnorableMountingException) {
return true
}
cause = cause.cause
}
return false
}
}
}
Loading