From 585c82b49b9de67636f6da5345a23150d0ed1f48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Sun, 15 Nov 2009 14:13:52 +0000 Subject: [PATCH] [INTERPRETER] * NEW: System.Error is a new property that returns the contents of the "errno" variable, which is the error code returned by the last system call. git-svn-id: svn://localhost/gambas/trunk@2421 867c0c6c-44f3-4631-809d-bfa615b0a4ec --- main/gbx/gbx_c_application.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/main/gbx/gbx_c_application.c b/main/gbx/gbx_c_application.c index 4162088ef..228765cce 100644 --- a/main/gbx/gbx_c_application.c +++ b/main/gbx/gbx_c_application.c @@ -364,6 +364,12 @@ BEGIN_PROPERTY(CSYSTEM_backtrace) END_PROPERTY +BEGIN_PROPERTY(CSYSTEM_error) + + GB_ReturnInteger(errno); + +END_PROPERTY + #endif GB_DESC NATIVE_AppArgs[] = @@ -398,10 +404,8 @@ GB_DESC NATIVE_App[] = GB_STATIC_PROPERTY_SELF("Args", ".ApplicationArgs"), GB_STATIC_PROPERTY_SELF("Env", ".ApplicationEnv"), GB_STATIC_PROPERTY_READ("Path", "s", CAPPLICATION_path), - //GB_STATIC_PROPERTY_READ("Home", "s", CAPPLICATION_home), GB_STATIC_PROPERTY_READ("Name", "s", CAPPLICATION_name), GB_STATIC_PROPERTY_READ("Title", "s", CAPPLICATION_title), - //GB_STATIC_PROPERTY_READ("User", "s", CAPPLICATION_user), GB_STATIC_PROPERTY_READ("Id", "i", CAPPLICATION_id), GB_STATIC_PROPERTY_READ("Handle", "i", CAPPLICATION_id), GB_STATIC_PROPERTY_READ("Version", "s", CAPPLICATION_version), @@ -426,6 +430,7 @@ GB_DESC NATIVE_System[] = GB_STATIC_PROPERTY_SELF("User", "User"), GB_STATIC_PROPERTY_READ("ByteOrder", "i", CSYSTEM_byte_order), GB_STATIC_PROPERTY_READ("Backtrace", "String[]", CSYSTEM_backtrace), + GB_STATIC_PROPERTY_READ("Error", "i", CSYSTEM_error), GB_END_DECLARE };