Kotlinify ReactInvalidPropertyException (#43759)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/43759

Changelog: [Internal]

As part of the Sustainability Week (see [post](https://fb.workplace.com/groups/251759413609061/permalink/742797531171911/)).

Reviewed By: rshest

Differential Revision: D55633375

fbshipit-source-id: 5b934ec2295c2f276249588f293fd56e243fb347
This commit is contained in:
Fabrizio Cucci
2024-04-02 16:17:39 -07:00
committed by Facebook GitHub Bot
parent 0a1a7cafa3
commit 16fd4e4c0f
3 changed files with 17 additions and 25 deletions
@@ -4421,7 +4421,7 @@ public abstract interface class com/facebook/react/uimanager/ReactCompoundViewGr
public abstract fun interceptsTouchEvent (FF)Z
}
public class com/facebook/react/uimanager/ReactInvalidPropertyException : java/lang/RuntimeException {
public final class com/facebook/react/uimanager/ReactInvalidPropertyException : java/lang/RuntimeException {
public fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
}
@@ -1,24 +0,0 @@
/*
* 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.uimanager;
import com.facebook.infer.annotation.Nullsafe;
@Nullsafe(Nullsafe.Mode.LOCAL)
public class ReactInvalidPropertyException extends RuntimeException {
public ReactInvalidPropertyException(String property, String value, String expectedValues) {
super(
"Invalid React property `"
+ property
+ "` with value `"
+ value
+ "`, expected "
+ expectedValues);
}
}
@@ -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.uimanager
public class ReactInvalidPropertyException(
property: String,
value: String,
expectedValues: String
) :
RuntimeException(
"Invalid React property `$property` with value `$value`, expected $expectedValues")