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