Home | History | Annotate | Download | only in native
      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 #ifdef __cplusplus
     17 extern "C" {
     18 #endif
     19 
     20 /**
     21 * Checks if an error has occured.
     22 * Throws a generic Java RuntimeException if an error has occured.
     23 * @param env JNI environment variable
     24 * @param errorcode code to determine if it is an erro
     25 * @return 0 if errorcode is not an error, 1 if errorcode is an error, but the
     26 *         creation of the exception to be thrown fails
     27 * @exception thrown if errorcode represents an error
     28 */
     29 UBool icu4jni_error(JNIEnv* env, UErrorCode errorcode);
     30 
     31 #ifdef __cplusplus
     32 }
     33 #endif
     34 
     35 #endif
     36