(State s, int code)
| 148 | } |
| 149 | |
| 150 | static int makeError(State s, int code) { |
| 151 | if (code >= BROTLI_OK) { |
| 152 | return code; |
| 153 | } |
| 154 | if (s.runningState >= 0) { |
| 155 | s.runningState = code; // Only the first error is remembered. |
| 156 | } |
| 157 | // TODO(eustas): expand codes to messages, if ever necessary. |
| 158 | if (code <= BROTLI_PANIC) { |
| 159 | throw new IllegalStateException("Brotli error code: " + code); |
| 160 | } |
| 161 | throw new BrotliRuntimeException("Error code: " + code); |
| 162 | } |
| 163 | } |
no outgoing calls
no test coverage detected