Package hudson.util
Class FormFillFailure
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
hudson.util.FormFillFailure
- All Implemented Interfaces:
Serializable,org.kohsuke.stapler.HttpResponse
public abstract class FormFillFailure
extends IOException
implements org.kohsuke.stapler.HttpResponse
Represents a failure in a form field doFillXYZ method.
Use one of the factory methods to create an instance, then throw it from your doFillXyz
method.
- Since:
- 2.50
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic FormFillFailureSends out a string error message that indicates an error.static FormFillFailureSends out a string error message that indicates an error, by formatting it withString.format(String, Object[])static FormFillFailureSends out a string error message, with optional "show details" link that expands to the full stack trace.static FormFillFailurestatic FormFillFailureerrorWithMarkup(String message) Sends out an HTML fragment that indicates an error.voidgenerateResponse(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp, Object node) getKind()booleanabstract Stringstatic FormFillFailurerespond(FormValidation.Kind kind, String html) Sends out an arbitrary HTML fragment as the output.static FormFillFailurestatic FormFillFailurestatic FormFillFailurestatic FormFillFailurestatic FormFillFailurewarningWithMarkup(String message) Flags this failure as requiring that the select options should be cleared out.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.kohsuke.stapler.HttpResponse
generateResponse
-
Method Details
-
error
Sends out a string error message that indicates an error.- Parameters:
message- Human readable message to be sent.
-
warning
-
error
Sends out a string error message that indicates an error, by formatting it withString.format(String, Object[]) -
warning
-
error
Sends out a string error message, with optional "show details" link that expands to the full stack trace.Use this with caution, so that anonymous users do not gain too much insights into the state of the system, as error stack trace often reveals a lot of information. Consider if an error needs to be exposed to everyone or just those who have higher access to job/hudson/etc.
-
warning
-
error
-
warning
-
errorWithMarkup
Sends out an HTML fragment that indicates an error.This method must be used with care to avoid cross-site scripting attack.
- Parameters:
message- Human readable message to be sent.error(null)can be used asok().
-
warningWithMarkup
-
respond
Sends out an arbitrary HTML fragment as the output. -
generateResponse
public void generateResponse(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp, Object node) throws IOException, jakarta.servlet.ServletException - Specified by:
generateResponsein interfaceorg.kohsuke.stapler.HttpResponse- Throws:
IOExceptionjakarta.servlet.ServletException
-
getKind
-
isSelectionCleared
public boolean isSelectionCleared() -
withSelectionCleared
Flags this failure as requiring that the select options should be cleared out.- Returns:
thisfor method chaining.
-
renderHtml
-