exit codes as enum
use right kind of "assert" for pointer check