this should not be written this way, because IDEs will report this class as being deprecated when using it. Instead, the LegacyErrorHandler should be marked deprecated