[seed] Return non-zero exit code if an exception occurs
- From: Tim Horton <hortont src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [seed] Return non-zero exit code if an exception occurs
- Date: Wed, 6 Jan 2010 08:50:05 +0000 (UTC)
commit 62bf28a41b3372cd6eed5823e941f0d54ccc9a0e
Author: Tim Horton <hortont424 gmail com>
Date: Wed Jan 6 02:05:05 2010 -0500
Return non-zero exit code if an exception occurs
src/main.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/main.c b/src/main.c
index fb60790..774b74a 100644
--- a/src/main.c
+++ b/src/main.c
@@ -49,7 +49,10 @@ seed_repl ()
seed_evaluate (eng->context, script, 0);
if ((e = seed_script_exception (script)))
- g_critical ("%s", seed_exception_to_string (eng->context, e));
+ {
+ g_critical ("%s", seed_exception_to_string (eng->context, e));
+ exit (EXIT_FAILURE);
+ }
g_free (script);
}
@@ -90,7 +93,10 @@ seed_exec (gchar * filename)
seed_evaluate (eng->context, script, 0);
if ((e = seed_script_exception (script)))
- g_critical ("%s", seed_exception_to_string (eng->context, e));
+ {
+ g_critical ("%s", seed_exception_to_string (eng->context, e));
+ exit (EXIT_FAILURE);
+ }
g_free (script);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]