Package com.vaadin.flow.server
Class ContentSecurityPolicyViolationException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.IllegalStateException
com.vaadin.flow.server.ContentSecurityPolicyViolationException
- All Implemented Interfaces:
Serializable
Thrown in the
ContentSecurityPolicyMode.STRICT Content Security
Policy mode by an API that sends JavaScript to the browser as a string, such
as Element.executeJs(String, Object...). The
browser would compile such a string with new Function, which a
strict policy without unsafe-eval blocks, so the call fails on
the server instead, where the stack trace points at the code that made it.
The stack trace starts at the API and leads to the code that called it.
- Since:
- 25.4
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new exception with the given detail message. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ContentSecurityPolicyViolationException
Creates a new exception with the given detail message.- Parameters:
message- the detail message, notnull
-