summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2018-12-27 19:31:59 (EST)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2018-12-27 19:31:59 (EST)
commitc8a97b5184d534b41d6c26e8f0fba56b39e2b573 (patch)
tree0d12233797b4e62ffcee7ea644a3965965a12cd4 /lib
parentda0849ba6bf223f1937c80ccb32cd0558f31d6a5 (diff)
ob_error(): Document
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