Class MissingContextVariableException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- org.jenkinsci.plugins.workflow.steps.MissingContextVariableException
-
- All Implemented Interfaces:
Serializable
public class MissingContextVariableException extends Exception
Indicates that a required context was not available.- Author:
- Kohsuke Kawaguchi
- See Also:
StepContext.get(Class)
,TODO: extend from AbortException if it's not final
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MissingContextVariableException(Class<?> type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getMessage()
List<StepDescriptor>
getProviders()
ReturnsStepDescriptor
s with body that can provide a context of this type, so that the error message can diagnose what steps were likely missing.Class<?>
getType()
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
MissingContextVariableException
public MissingContextVariableException(@NonNull Class<?> type)
-
-
Method Detail
-
getType
public Class<?> getType()
-
getMessage
public String getMessage()
- Overrides:
getMessage
in classThrowable
-
getProviders
@NonNull public List<StepDescriptor> getProviders()
ReturnsStepDescriptor
s with body that can provide a context of this type, so that the error message can diagnose what steps were likely missing.In such error diagnosing context, we don't care about
StepDescriptor
s that just decorates/modifies the existing context, so we check required context as well to exclude them
-
-