Where Online Learning is simpler!
The C and C++ Include Header Files
cat -n /usr/include/wasm-rt-exceptions.h
1 /* 2 * Copyright 2018 WebAssembly Community Group participants 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #ifndef WASM_RT_EXCEPTIONS_H_ 18 #define WASM_RT_EXCEPTIONS_H_ 19 20 #include "wasm-rt.h" 21 22 #ifdef __cplusplus 23 extern "C" { 24 #endif 25 26 /** 27 * A tag is represented as an arbitrary pointer. 28 */ 29 typedef const void* wasm_rt_tag_t; 30 31 /** 32 * Set the active exception to given tag, size, and contents. 33 */ 34 void wasm_rt_load_exception(const wasm_rt_tag_t tag, 35 uint32_t size, 36 const void* values); 37 38 /** 39 * Throw the active exception. 40 */ 41 WASM_RT_NO_RETURN void wasm_rt_throw(void); 42 43 /** 44 * The type of an unwind target if an exception is thrown and caught. 45 */ 46 #define WASM_RT_UNWIND_TARGET wasm_rt_jmp_buf 47 48 /** 49 * Get the current unwind target if an exception is thrown. 50 */ 51 WASM_RT_UNWIND_TARGET* wasm_rt_get_unwind_target(void); 52 53 /** 54 * Set the unwind target if an exception is thrown. 55 */ 56 void wasm_rt_set_unwind_target(WASM_RT_UNWIND_TARGET* target); 57 58 /** 59 * Tag of the active exception. 60 */ 61 wasm_rt_tag_t wasm_rt_exception_tag(void); 62 63 /** 64 * Size of the active exception. 65 */ 66 uint32_t wasm_rt_exception_size(void); 67 68 /** 69 * Contents of the active exception. 70 */ 71 void* wasm_rt_exception(void); 72 73 #ifdef __cplusplus 74 } 75 #endif 76 77 #endif