keecode logokeecode
6

Non-function Handler

Internal exception handler not a function

Node.js

Exit Code Information

Exit Code

6

Name

Non-function Handler

Category

Node.js

Usage Context

Exception handler is not callable

Common Usage

Bash Script

#!/bin/bash

if [ condition ]; then
  echo "Non-function Handler"
  exit 6
fi

Check Exit Code

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

# Check if exit code matches
if [ $? -eq 6 ]; then
  echo "Non-function Handler"
fi

Node.js/JavaScript

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

// Or throw error that results in exit code
if (error) {
  console.error('Non-function Handler');
  process.exit(6);
}

Python

import sys

# Exit with code 6
if error:
    print("Non-function Handler")
    sys.exit(6)