public class ErrorReporterForTask extends Object implements ErrorReporter
Constructor and Description |
---|
ErrorReporterForTask(MessageLogger logger)
Create to use a particular logger to report errors.
|
Modifier and Type | Method and Description |
---|---|
boolean |
hasWarningOccurred()
Checks if at least one warning has been outputted.
|
void |
recordError(Class<?> classOriginating,
String message)
Reports an error with a constant string error message.
|
void |
recordError(Class<?> classOriginating,
String message,
Throwable exc)
Reports an error that occurred as an exception, with a message first introducing it.
|
void |
recordError(Class<?> classOriginating,
Throwable exc)
Reports an error that occurred as an exception
|
void |
recordWarning(String message)
Reports an warning with a constant string error message.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
recordErrorFormatted, recordWarningFormatted
public ErrorReporterForTask(MessageLogger logger)
logger
- the logger.public void recordError(Class<?> classOriginating, Throwable exc)
ErrorReporter
recordError
in interface ErrorReporter
classOriginating
- a class in which the error originates (where it was thrown)exc
- the error that occurredpublic void recordError(Class<?> classOriginating, String message)
ErrorReporter
recordError
in interface ErrorReporter
classOriginating
- a class in which the error originates (where it was thrown)message
- a message describing the error that occurredpublic void recordError(Class<?> classOriginating, String message, Throwable exc)
ErrorReporter
recordError
in interface ErrorReporter
classOriginating
- a class in which the error originates (where it was thrown).message
- the message explaining the error.exc
- the error that occurred.public void recordWarning(String message)
ErrorReporter
recordWarning
in interface ErrorReporter
message
- a message describing the warning.public boolean hasWarningOccurred()
ErrorReporter
hasWarningOccurred
in interface ErrorReporter
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.