A function that handles warnings or errors. Receives an Object representing the error.
typedef WarnFunction = void Function(Object error);