summaryrefslogtreecommitdiff
path: root/it.class
diff options
context:
space:
mode:
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);
}