GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
SHTK_ABORT(3) FreeBSD Library Functions Manual SHTK_ABORT(3)

shtk_abortAborts the program with an optional error message

shtk_abort [message1 .. messageN]

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 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 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.

shtk(3), shtk_cli(3)

shtk_abort first appeared in shtk 1.7.

September 14, 2016 FreeBSD 14.3-RELEASE

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.