summaryrefslogtreecommitdiff
path: root/it.class
diff options
context:
space:
mode:
authorUrban Müller2007-06-28 15:35:30 +0000
committerUrban Müller2007-06-28 15:35:30 +0000
commitc45e81567c5701ffc8dba3ac778d8cc036ed0a0c (patch)
treec0dfccac9ed55dd9088f1c595babb0c922b9f5b7 /it.class
parent1c8b9b4df7c00797339cdeb6d9d9895588b67383 (diff)
downloaditools-c45e81567c5701ffc8dba3ac778d8cc036ed0a0c.tar.gz
itools-c45e81567c5701ffc8dba3ac778d8cc036ed0a0c.tar.bz2
itools-c45e81567c5701ffc8dba3ac778d8cc036ed0a0c.zip
exit with errcode
Diffstat (limited to 'it.class')
-rw-r--r--it.class12
1 files changed, 11 insertions, 1 deletions
diff --git a/it.class b/it.class
index 1966c62..ec4a217 100644
--- a/it.class
+++ b/it.class
@@ -146,7 +146,17 @@ function error($p = array(), $body = "", $to = "")
function fatal($title='', $body='', $to='')
{
it::error($title, $body, $to);
- exit;
+ exit(1);
+}
+
+
+/**
+ * Print message to stderr and exit with error code
+ */
+function bail($message = "bailed.\n")
+{
+ fputs(STDERR, $message);
+ exit(1);
}