Programming-Idioms

This language bar is your friend. Select your favorite languages!

Idiom #198 Abort program execution with error condition

Abort program execution with error condition x (where x is an integer value)

#include <stdlib.h>
exit(x);
STOP 1
import "os"
os.Exit(x)
import System.Exit (exitWith, ExitFailure)
exitWith (ExitFailure 4)
process.exit(x);
os.exit(x)
Runerror(x);
exit $x;
import sys
sys.exit(x)
exit x
use std::process;
process::exit(x);

Do you know the best way to do this in your language ?
New implementation...

Idiom created by

Bart