Package com.axelor.meta
Class IllegalFileException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.IllegalArgumentException
com.axelor.meta.IllegalFileException
- All Implemented Interfaces:
Serializable
Exception thrown when a file fails validation (e.g. disallowed name or content type).
Extends IllegalArgumentException for backward compatibility with existing catch
blocks.
Use getLocalizedMessage() to retrieve the message translated to the current user
locale when sending feedback to the frontend.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionIllegalFileException(String message) IllegalFileException(String message, String param) Creates an exception with a message key and a parameter to format into the message. -
Method Summary
Modifier and TypeMethodDescriptionReturns the exception message translated to the current user locale, with any format parameters applied.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
IllegalFileException
-
IllegalFileException
Creates an exception with a message key and a parameter to format into the message.- Parameters:
message- the message keyparam- the value to format into the message (e.g. file name or file type)
-
-
Method Details
-
getMessage
- Overrides:
getMessagein classThrowable
-
getLocalizedMessage
Returns the exception message translated to the current user locale, with any format parameters applied.- Overrides:
getLocalizedMessagein classThrowable- Returns:
- the translated and formatted message
-