Logo

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)

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

New implementation...
< >
Bart