The Android Open Source Project | 2ad60cf | 2008-10-21 07:00:00 -0700 | [diff] [blame^] | 1 | /** |
| 2 | ******************************************************************************* |
| 3 | * Copyright (C) 1996-2005, International Business Machines Corporation and * |
| 4 | * others. All Rights Reserved. * |
| 5 | ******************************************************************************* |
| 6 | ******************************************************************************* |
| 7 | */ |
| 8 | |
| 9 | #ifndef ERRORCODE_H |
| 10 | #define ERRORCODE_H |
| 11 | |
| 12 | #include <jni.h> |
| 13 | #include "unicode/utypes.h" |
| 14 | #include "unicode/putil.h" |
| 15 | |
| 16 | /** |
| 17 | * Checks if an error has occured. |
| 18 | * Throws a generic Java RuntimeException if an error has occured. |
| 19 | * @param env JNI environment variable |
| 20 | * @param errorcode code to determine if it is an erro |
| 21 | * @return 0 if errorcode is not an error, 1 if errorcode is an error, but the |
| 22 | * creation of the exception to be thrown fails |
| 23 | * @exception thrown if errorcode represents an error |
| 24 | */ |
| 25 | UBool icu4jni_error(JNIEnv *env, UErrorCode errorcode); |
| 26 | |
| 27 | #endif |