Implement src/error.c to provide the patty_error type, to allow easy error string formatting, error state checking, and error clearing