Skip to content

Commit

Permalink
et update-rn
Browse files Browse the repository at this point in the history
  • Loading branch information
Kudo committed Oct 13, 2022
1 parent 192285b commit 4507721
Show file tree
Hide file tree
Showing 14 changed files with 3,685 additions and 4,231 deletions.
6 changes: 3 additions & 3 deletions ReactAndroid/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import de.undercouch.gradle.tasks.download.Download
import org.apache.tools.ant.taskdefs.condition.Os
import org.apache.tools.ant.filters.ReplaceTokens

def AAR_OUTPUT_URL = "file://${projectDir}/../android"
def AAR_OUTPUT_URL = "file:${System.env.HOME}/.m2/repository"
// We download various C++ open-source dependencies into downloads.
// We then copy both the downloaded code and our custom makefiles and headers into third-party-ndk.
// After that we build native code from src/main/jni with module path pointing at third-party-ndk.
Expand Down Expand Up @@ -59,7 +59,7 @@ logger.info(":ReactAndroid - buildHermesSource[${buildHermesSource}]")

// We put the publishing version from gradle.properties inside ext. so other
// subprojects can access it as well.
ext.publishing_version = VERSION_NAME
ext.publishing_version = '47.0.0'

task createNativeDepsDirectories {
downloadsDir.mkdirs()
Expand Down Expand Up @@ -462,7 +462,7 @@ afterEvaluate {
// You can then customize attributes of the publication as shown below.
artifactId = POM_ARTIFACT_ID
groupId = GROUP
version = VERSION_NAME
version = '47.0.0'

pom {
name = POM_NAME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,28 @@
* 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;

/** Crashy crashy exception handler. */
public class DefaultJSExceptionHandler implements JSExceptionHandler {

@Override
public void handleException(Exception e) {
if (e instanceof RuntimeException) {
// Because we are rethrowing the original exception, the original stacktrace will be
// preserved.
throw (RuntimeException) e;
} else {
throw new RuntimeException(e);
@Override
public void handleException(Exception e) {
try {
{
if (e instanceof RuntimeException) {
// preserved.
throw (RuntimeException) e;
} else {
throw new RuntimeException(e);
}
}
} catch (RuntimeException expoException) {
try {
Class.forName("host.exp.exponent.ReactNativeStaticHelpers").getMethod("handleReactNativeError", String.class, Object.class, Integer.class, Boolean.class).invoke(null, expoException.getMessage(), null, -1, true);
} catch (Exception expoHandleErrorException) {
expoHandleErrorException.printStackTrace();
}
}
}
}
}
Loading

0 comments on commit 4507721

Please sign in to comment.