US 12,405,879 B2
Exception handling method and apparatus, device, and storage medium
Hongkai Liu, Beijing (CN)
Assigned to BEIJING BYTEDANCE NETWORK TECHNOLOGY CO., LTD., Beijing (CN)
Appl. No. 18/283,696
Filed by Beijing Bytedance Network Technology Co., Ltd., Beijing (CN)
PCT Filed Feb. 28, 2022, PCT No. PCT/CN2022/078363
§ 371(c)(1), (2) Date Sep. 22, 2023,
PCT Pub. No. WO2022/206253, PCT Pub. Date Oct. 6, 2022.
Claims priority of application No. 202110333171.6 (CN), filed on Mar. 29, 2021.
Prior Publication US 2024/0168865 A1, May 23, 2024
Int. Cl. G06F 11/362 (2025.01); G06F 9/455 (2018.01)
CPC G06F 11/366 (2013.01) [G06F 9/45558 (2013.01); G06F 2009/45591 (2013.01)] 15 Claims
OG exemplary drawing
 
1. An exception handling method, comprising:
acquiring, when it is determined that an exception event occurs for Java code invoked based on a Java Native Interface (JNI), a Java exception object corresponding to the exception event, the Java exception object characterizing the exception event;
deleting an exception identifier corresponding to the exception event, the exception identifier characterizing that a Java virtual machine is in an exceptional working state; and
invoking a pre-configured Java exception handler based on the JNI, and performing exception handling on the Java exception object using the pre-configured Java exception handler, the pre-configured Java exception handler being configured to report the exception event corresponding to the Java exception object as a Java crash event.