summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/output.sh13
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/output.sh b/lib/output.sh
index cc6fa4b..7f5e54f 100644
--- a/lib/output.sh
+++ b/lib/output.sh
@@ -1,6 +1,6 @@
# Functions for printing messages
#
-# Copyright (C) 2012 Patrick McDermott
+# Copyright (C) 2012, 2018 Patrick McDermott
#
# This file is part of opkbuild.
#
@@ -17,6 +17,17 @@
# You should have received a copy of the GNU General Public License
# along with opkbuild. If not, see <http://www.gnu.org/licenses/>.
+## @brief Print an error message and exit
+## @details \fBob_error\fP prints \fIarguments\fP according to \fIformat\fP and
+## then exits the application.
+## @operand format req The format string. See \fBprintf\fP(1) for the syntax
+## of \fIformat\fP.
+## @operand arguments opt Arguments to be printed, as referenced by
+## \fIformat\fP.
+## @return This function does not return. It causes the application to exit
+## with an exit status of 1.
+## @stderr This function prints the formatted error message to stderr.
+## @pure no This function causes the current shell to exit.
ob_error()
{
printf '%s: Error: ' "${0##*/}" >&2