Package com.vaadin.flow.server
Class CspViolationException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.IllegalStateException
com.vaadin.flow.server.CspViolationException
- All Implemented Interfaces:
Serializable
Thrown in the
CspMode.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
ConstructorsConstructorDescriptionCspViolationException(String message) Creates 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
-
CspViolationException
Creates a new exception with the given detail message.- Parameters:
message- the detail message, notnull
-