Skip to content

Commit 5e93c5d

Browse files
authored
Merge pull request #5 from react-native-oh-library/dev
更新公仓配置
2 parents 0dea6d9 + 25acd51 commit 5e93c5d

File tree

6 files changed

+8
-11
lines changed

6 files changed

+8
-11
lines changed

harmony/exception_handler.har

-157 Bytes
Binary file not shown.
Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
1-
import { harTasks } from '@ohos/hvigor-ohos-plugin';
2-
3-
export default {
4-
system: harTasks, /* Built-in plugin of Hvigor. It cannot be modified. */
5-
plugins:[] /* Custom plugin to extend the functionality of Hvigor. */
6-
}
1+
export { harTasks } from '@ohos/hvigor-ohos-plugin';

harmony/exception_handler/src/main/module.json5

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
"name": "exception_handler",
44
"type": "har",
55
"deviceTypes": [
6-
"default",
7-
"tablet",
8-
"2in1"
6+
"default"
97
]
108
}
119
}

harmony/exception_handler/src/main/resources/base/media/ic_public_error.svg

Lines changed: 1 addition & 1 deletion
Loading

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@react-native-oh-tpl/react-native-exception-handler",
3-
"version": "2.10.10-0.0.4",
3+
"version": "2.10.10-0.0.5",
44
"description": "A react native module that lets you to register a global error handler that can capture fatal/non fatal uncaught exceptions.",
55
"react-native": "src/index",
66
"source": "src/index",
@@ -18,6 +18,7 @@
1818
"!android/build",
1919
"ios",
2020
"!ios/build",
21+
"harmony/exception_handler",
2122
"harmony/exception_handler.har",
2223
"!harmony/build",
2324
"!harmony/oh_modules",

src/index.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ export const setNativeExceptionHandler = (handler = noop, forceAppQuit = true, e
5555
}
5656
if (Platform.OS === "ios") {
5757
ExceptionHandlerTurboModule.setHandlerforNativeException(handler, executeDefaultHandler);
58+
// @ts-ignore
59+
} else if (Platform.OS === "harmony") {
60+
ExceptionHandlerTurboModule.setHandlerforNativeException(handler, forceAppQuit, executeDefaultHandler);
5861
} else {
5962
ExceptionHandlerTurboModule.setHandlerforNativeException(handler, forceAppQuit, executeDefaultHandler);
6063
}

0 commit comments

Comments
 (0)