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 termi-
     nates  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  de-
     picted  by  message1  to  messageN; all arguments are concatenated together
     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 because  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 15.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+15.1.quarterly>

home | help