Sets the current error If you go past the stack size for this, it cycles the errors, almost like a LRU algo.
| 24 | // Sets the current error |
| 25 | // If you go past the stack size for this, it cycles the errors, almost like a LRU algo. |
| 26 | ILAPI void ILAPIENTRY ilSetError(ILenum Error) |
| 27 | { |
| 28 | ILuint i; |
| 29 | |
| 30 | ilErrorPlace++; |
| 31 | if (ilErrorPlace >= IL_ERROR_STACK_SIZE) { |
| 32 | for (i = 0; i < IL_ERROR_STACK_SIZE - 2; i++) { |
| 33 | ilErrorNum[i] = ilErrorNum[i+1]; |
| 34 | } |
| 35 | ilErrorPlace = IL_ERROR_STACK_SIZE - 1; |
| 36 | } |
| 37 | ilErrorNum[ilErrorPlace] = Error; |
| 38 | |
| 39 | return; |
| 40 | } |
| 41 | |
| 42 | |
| 43 | //! Gets the last error on the error stack |
no outgoing calls
no test coverage detected