misc: Added function custom_error

This function prints a message on stderr and exit.

Signed-off-by: Celelibi <celelibi@gmail.com>