diff options
author | Urban Müller | 2007-06-28 15:35:30 +0000 |
---|---|---|
committer | Urban Müller | 2007-06-28 15:35:30 +0000 |
commit | c45e81567c5701ffc8dba3ac778d8cc036ed0a0c (patch) | |
tree | c0dfccac9ed55dd9088f1c595babb0c922b9f5b7 /it.class | |
parent | 1c8b9b4df7c00797339cdeb6d9d9895588b67383 (diff) | |
download | itools-c45e81567c5701ffc8dba3ac778d8cc036ed0a0c.tar.gz itools-c45e81567c5701ffc8dba3ac778d8cc036ed0a0c.tar.bz2 itools-c45e81567c5701ffc8dba3ac778d8cc036ed0a0c.zip |
exit with errcode
Diffstat (limited to 'it.class')
-rw-r--r-- | it.class | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -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); } |