ReFrame Errors¶
When writing ReFrame tests, you don’t need to check for any exceptions raised. The runtime will take care of finalizing your test and continuing execution.
Dealing with ReFrame errors is only useful if you are extending ReFrame’s functionality, either by modifying its core or by creating new regression test base classes for fulfilling your specific needs.
Warning
This API is considered a developer’s API, so it can change from version to version without a deprecation warning.
-
exception
reframe.core.exceptions.AbortTaskError(*args)[source]¶ Bases:
reframe.core.exceptions.ReframeErrorRaised by the runtime inside a regression task to denote that it has been aborted due to an external reason (e.g., keyboard interrupt, fatal error in other places etc.)
-
exception
reframe.core.exceptions.BuildError(stdout, stderr)[source]¶ Bases:
reframe.core.exceptions.ReframeErrorRaised when a build fails.
-
exception
reframe.core.exceptions.BuildSystemError(*args)[source]¶ Bases:
reframe.core.exceptions.ReframeErrorRaised when a build system is not configured properly.
-
exception
reframe.core.exceptions.ConfigError(*args)[source]¶ Bases:
reframe.core.exceptions.ReframeErrorRaised when a configuration error occurs.
-
exception
reframe.core.exceptions.ContainerError(*args)[source]¶ Bases:
reframe.core.exceptions.ReframeErrorRaised when a container platform is not configured properly.
-
exception
reframe.core.exceptions.DependencyError(*args)[source]¶ Bases:
reframe.core.exceptions.ReframeErrorRaised when a dependency problem is encountered.
-
exception
reframe.core.exceptions.EnvironError(*args)[source]¶ Bases:
reframe.core.exceptions.ReframeErrorRaised when an error related to an environment occurs.
-
exception
reframe.core.exceptions.FailureLimitError(*args)[source]¶ Bases:
reframe.core.exceptions.ReframeErrorRaised when the limit of test failures has been reached.
-
exception
reframe.core.exceptions.ForceExitError(*args)[source]¶ Bases:
reframe.core.exceptions.ReframeErrorRaised when ReFrame execution must be forcefully ended, e.g., after a SIGTERM was received.
-
exception
reframe.core.exceptions.JobBlockedError(msg=None, jobid=None)[source]¶ Bases:
reframe.core.exceptions.JobErrorRaised by job schedulers when a job is blocked indefinitely.
-
exception
reframe.core.exceptions.JobError(msg=None, jobid=None)[source]¶ Bases:
reframe.core.exceptions.ReframeErrorRaised for job related errors.
-
property
jobid¶ The job ID of the job that encountered the error.
-
property
-
exception
reframe.core.exceptions.JobNotStartedError(msg=None, jobid=None)[source]¶ Bases:
reframe.core.exceptions.JobErrorRaised when trying an operation on a unstarted job.
-
exception
reframe.core.exceptions.JobSchedulerError(*args)[source]¶ Bases:
reframe.core.exceptions.ReframeErrorRaised when a job scheduler encounters an error condition.
-
exception
reframe.core.exceptions.LoggingError(*args)[source]¶ Bases:
reframe.core.exceptions.ReframeErrorRaised when an error related to logging has occurred.
-
exception
reframe.core.exceptions.NameConflictError(*args)[source]¶ Bases:
reframe.core.exceptions.RegressionTestLoadErrorRaised when there is a name clash in the test suite.
-
exception
reframe.core.exceptions.PerformanceError(*args)[source]¶ Bases:
reframe.core.exceptions.ReframeErrorRaised to denote an error in performance checking, e.g., when a performance reference is not met.
-
exception
reframe.core.exceptions.PipelineError(*args)[source]¶ Bases:
reframe.core.exceptions.ReframeErrorRaised when a condition prevents the regression test pipeline to continue and the error may not be described by another more specific exception.
-
exception
reframe.core.exceptions.ReframeBaseError(*args)[source]¶ Bases:
BaseExceptionBase exception for any ReFrame error.
This exception base class offers a specialized
__str__()method that concatenates the messages of a chain of exceptions by inspecting their__cause__field. For example, the following piece of code will printerror message 2: error message 1:from reframe.core.exceptions import * def foo(): raise ReframeError('error message 1) def bar(): try: foo() except ReframeError as e: raise ReframeError('error message 2') from e if __name__ == '__main__': try: bar() except Exception as e: print(e)
-
exception
reframe.core.exceptions.ReframeError(*args)[source]¶ Bases:
reframe.core.exceptions.ReframeBaseError,ExceptionBase exception for soft errors.
Soft errors may be treated by simply printing the exception’s message and trying to continue execution if possible.
-
exception
reframe.core.exceptions.ReframeFatalError(*args)[source]¶ Bases:
reframe.core.exceptions.ReframeBaseErrorA fatal framework error.
Execution must be aborted.
-
exception
reframe.core.exceptions.ReframeSyntaxError(*args)[source]¶ Bases:
reframe.core.exceptions.ReframeErrorRaised when the syntax of regression tests is incorrect.
-
exception
reframe.core.exceptions.RegressionTestLoadError(*args)[source]¶ Bases:
reframe.core.exceptions.ReframeErrorRaised when the regression test cannot be loaded.
-
exception
reframe.core.exceptions.SanityError(*args)[source]¶ Bases:
reframe.core.exceptions.ReframeErrorRaised to denote an error in sanity checking.
-
exception
reframe.core.exceptions.SpawnedProcessError(args, stdout, stderr, exitcode)[source]¶ Bases:
reframe.core.exceptions.ReframeErrorRaised when a spawned OS command has failed.
-
property
command¶ The command that the spawned process tried to execute.
-
property
exitcode¶ The exit code of the process.
-
property
stderr¶ The standard error of the process as a string.
-
property
stdout¶ The standard output of the process as a string.
-
property
-
exception
reframe.core.exceptions.SpawnedProcessTimeout(args, stdout, stderr, timeout)[source]¶ Bases:
reframe.core.exceptions.SpawnedProcessErrorRaised when a spawned OS command has timed out.
-
property
timeout¶ The timeout of the process.
-
property
-
exception
reframe.core.exceptions.StatisticsError(*args)[source]¶ Bases:
reframe.core.exceptions.ReframeErrorRaised to denote an error in dealing with statistics.
-
exception
reframe.core.exceptions.TaskDependencyError(*args)[source]¶ Bases:
reframe.core.exceptions.ReframeErrorRaised inside a regression task by the runtime when one of its dependencies has failed.
-
exception
reframe.core.exceptions.TaskExit(*args)[source]¶ Bases:
reframe.core.exceptions.ReframeErrorRaised when a regression task must exit the pipeline prematurely.
-
reframe.core.exceptions.is_exit_request(exc_type, exc_value, tb)[source]¶ Check if the error is a request to exit.
-
reframe.core.exceptions.is_severe(exc_type, exc_value, tb)[source]¶ Check if exception is a severe one.