Fix fatal error, when using custom error handling, not ignoring deprecated messages.