Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
SHTK_ABORT(3)		    Library Functions Manual		 SHTK_ABORT(3)

NAME
       shtk_abort -- Aborts the	program	with an	optional error message

SYNOPSIS
       shtk_abort [message1 .. messageN]

DESCRIPTION
       The  shtk_abort	function  prints the given error message to stderr and
       terminates execution of the script, including all subshells leading  up
       to the call to shtk_abort.

       The exit	code of	the script is non-zero but unspecified.

       The  message, if	provided, can be broken	up as one or more arguments as
       depicted	by message1 to messageN; all arguments	are  concatenated  to-
       gether into a single line.

       It  is  important to note that shtk_abort should	be used	exclusively to
       abruptly	abort the script due to	an internal  error  or	inconsistency.
       Think of	this function as a mechanism to	implement assertions:

	     [ -n "${should_be_set}" ] || shtk_abort "Internal variable	not set!"

       This  is	why shtk_abort is not in the shtk_cli(3) module, because it is
       not meant to provide a mechanism	for clean program terminations and be-
       cause it	is provided for	self-diagnostics purposes.

SEE ALSO
       shtk(3),	shtk_cli(3)

HISTORY
       shtk_abort first	appeared in shtk 1.7.

FreeBSD	Ports 14.quarterly    September	14, 2016		 SHTK_ABORT(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=shtk_abort&sektion=3&manpath=FreeBSD+Ports+14.3.quarterly>

home | help