keecode logokeecode
72

OS File Error

Critical OS file missing

Application

Exit Code Information

Exit Code

72

Name

OS File Error

Category

Application

Usage Context

System file did not exist or could not be opened

Common Usage

Bash Script

#!/bin/bash

if [ condition ]; then
  echo "OS File Error"
  exit 72
fi

Check Exit Code

./script.sh
echo $?  # Prints the exit code

# Check if exit code matches
if [ $? -eq 72 ]; then
  echo "OS File Error"
fi

Node.js/JavaScript

// Exit with code 72
process.exit(72);

// Or throw error that results in exit code
if (error) {
  console.error('OS File Error');
  process.exit(72);
}

Python

import sys

# Exit with code 72
if error:
    print("OS File Error")
    sys.exit(72)