{
if(((int)((errorCode & 0x3000) >> 12)) <= __ecereNameSpace__ecere__sys__globalSystem.errorLevel)
{
+int cat = (((unsigned int)((errorCode & 0xFFF) >> 0)) & 0xF00) >> 8;
+int code = ((unsigned int)((errorCode & 0xFFF) >> 0)) & 0xFF;
+
if(details)
-__ecereNameSpace__ecere__sys__Logf("System Error [%d]: %s (%s).\n", ((int)((errorCode & 0x3000) >> 12)), ((char **)((struct __ecereNameSpace__ecere__com__Array *)(((char *)__ecereNameSpace__ecere__sys__errorMessages + structSize_Instance)))->array)[((unsigned int)((errorCode & 0xFFF) >> 0))], details);
+__ecereNameSpace__ecere__sys__Logf("System Error [%d]: %s (%s).\n", ((int)((errorCode & 0x3000) >> 12)), ((char **)__extension__ ({
+char * __ecTemp1 = (((struct __ecereNameSpace__ecere__com__Instance **)((struct __ecereNameSpace__ecere__com__Array *)(((char *)__ecereNameSpace__ecere__sys__errorMessages + structSize_Instance)))->array)[cat]);
+
+((struct __ecereNameSpace__ecere__com__Array *)(__ecTemp1 + structSize_Instance));
+})->array)[code], details);
else
-__ecereNameSpace__ecere__sys__Logf("System Error [%d]: %s.\n", ((int)((errorCode & 0x3000) >> 12)), ((char **)((struct __ecereNameSpace__ecere__com__Array *)(((char *)__ecereNameSpace__ecere__sys__errorMessages + structSize_Instance)))->array)[((unsigned int)((errorCode & 0xFFF) >> 0))]);
+__ecereNameSpace__ecere__sys__Logf("System Error [%d]: %s.\n", ((int)((errorCode & 0x3000) >> 12)), ((char **)__extension__ ({
+char * __ecTemp1 = (((struct __ecereNameSpace__ecere__com__Instance **)((struct __ecereNameSpace__ecere__com__Array *)(((char *)__ecereNameSpace__ecere__sys__errorMessages + structSize_Instance)))->array)[cat]);
+
+((struct __ecereNameSpace__ecere__com__Array *)(__ecTemp1 + structSize_Instance));
+})->array)[code]);
}
__ecereNameSpace__ecere__sys__globalSystem.lastErrorCode = errorCode;
}
GuiApplication guiApp;
int terminateX;
-static Array<String> errorMessages
-{ [
- $"No error",
- $"Graphics driver not supported by any user interface system",
- $"Window creation failed",
- $"Window graphics loading failed",
- $"Driver/Mode switch failed"
-] };
-
public class GuiApplication : Application
{
int numDrivers;
static define DEFAULT_BUFFER_SIZE = 100 * MAX_F_STRING;
-static Array<String> errorMessages
+static Array<Array<String>> errorMessages
{ [
- $"No error",
- $"Memory allocation failed",
- $"Inexistant string identifier specified",
- $"Identic string identifier already exists",
- $"Shared library loading failed",
- $"File not found",
- $"Couldn't write to file"
+ // System
+ { [
+ $"No error",
+ $"Memory allocation failed",
+ $"Inexistant string identifier specified",
+ $"Identic string identifier already exists",
+ $"Shared library loading failed",
+ $"File not found",
+ $"Couldn't write to file"
+ ] },
+ // GUI
+ { [
+ $"No error",
+ $"Graphics driver not supported by any user interface system",
+ $"Window creation failed",
+ $"Window graphics loading failed",
+ $"Driver/Mode switch failed"
+ ] }
] };
// --- File, directory & environment manipulation ---
{
if(errorCode.level <= globalSystem.errorLevel)
{
+ int cat = (errorCode.code & 0xF00) >> 8;
+ int code = errorCode.code & 0xFF;
if(details)
Logf("System Error [%d]: %s (%s).\n",
errorCode.level,
- errorMessages[errorCode.code],
+ errorMessages[cat][code],
details);
else
Logf("System Error [%d]: %s.\n",
errorCode.level,
- errorMessages[errorCode.code]);
+ errorMessages[cat][code]);
}
globalSystem.lastErrorCode = errorCode;
}