1 package org.robolectric.res.android; 2 3 // transliterated from https://android.googlesource.com/platform/system/core/+/android-9.0.0_r12/include/utils/Errors.h 4 5 public class Errors { 6 7 public static final int NO_ERROR = 0; 8 9 // in the Cpp code, 'int' return values can either indicate an error, or a valid value 10 // success can be interpreted as return value >= 0. So make all error codes negative values 11 // following the convention of assigning UNKNOWN_ERROR to INT32_MIN value as a base and 12 // incrementing from there 13 14 public static final int UNKNOWN_ERROR = Integer.MIN_VALUE; 15 public static final int BAD_INDEX = UNKNOWN_ERROR + 1; 16 public static final int BAD_TYPE = UNKNOWN_ERROR + 2; 17 public static final int BAD_VALUE = UNKNOWN_ERROR + 3; 18 public static final int NO_MEMORY = UNKNOWN_ERROR + 4; 19 public static final int NAME_NOT_FOUND = UNKNOWN_ERROR + 5; 20 public static final int NO_INIT = UNKNOWN_ERROR + 6; 21 } 22