1 /*******************************************************************************
2 * Copyright (c) 2000, 2018 IBM Corporation and others.
4 * This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License 2.0
6 * which accompanies this distribution, and is available at
7 * https://www.eclipse.org/legal/epl-2.0/
9 * SPDX-License-Identifier: EPL-2.0
12 * IBM Corporation - initial API and implementation
13 *******************************************************************************/
31 #include <Tabflicks.h>
39 /* Optional custom definitions to exclude some types */
42 #define OS_LOAD_FUNCTION LOAD_FUNCTION
44 #include "os_custom.h"
46 #define NATIVE_TRY(env, that, func) \
48 #define NATIVE_CATCH(env, that, func) \
49 } __except(EXCEPTION_EXECUTE_HANDLER) { \
50 jclass expClass = (*env)->FindClass(env, "org/eclipse/swt/SWTError"); \
53 wsprintfA(buffer, "caught native exception: 0x%x", GetExceptionCode()); \
54 (*env)->ThrowNew(env, expClass, buffer); \
58 #define OS_NATIVE_ENTER_TRY(env, that, func) \
59 OS_NATIVE_ENTER(env, that, func); \
60 NATIVE_TRY(env, that, func);
61 #define OS_NATIVE_EXIT_CATCH(env, that, func) \
62 NATIVE_CATCH(env, that, func); \
63 OS_NATIVE_EXIT(env, that, func);