From bdb3a1f1e12b272dcff0f8d5fff3e2b499f19ec0 Mon Sep 17 00:00:00 2001 From: Niels Thykier Date: Wed, 20 May 2015 22:14:14 +0200 Subject: Dh_Lib: Promote error_exitcode to an API sub Signed-off-by: Niels Thykier --- doc/PROGRAMMING | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc/PROGRAMMING') diff --git a/doc/PROGRAMMING b/doc/PROGRAMMING index bca2312a..36eb88ea 100644 --- a/doc/PROGRAMMING +++ b/doc/PROGRAMMING @@ -173,6 +173,12 @@ nonquiet_print($message) error($errormsg) Pass this command a string, it will output it to standard error and exit. +error_exitcode($cmd) + Pass this subroutine a string (representing a command line), it will + output a message describing that the command failed to standard error + and exit. Note that this relies on the value of $? to produce a + meaningful error message. Even if $? is 0, this /will/ still terminate + the program (although with a rather unhelpful message). warning($message) Pass this command a string, and it will output it to standard error as a warning message. -- cgit v1.2.3