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
public class IllegalFileException extends IllegalArgumentException
Exception thrown when a file fails validation (e.g. disallowed name or content type).Extends
IllegalArgumentExceptionfor 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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description IllegalFileException(String message)IllegalFileException(String message, String param)Creates an exception with a message key and a parameter to format into the message.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetLocalizedMessage()Returns the exception message translated to the current user locale, with any format parameters applied.StringgetMessage()-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
IllegalFileException
public IllegalFileException(String message)
-
-
Method Detail
-
getMessage
public String getMessage()
- Overrides:
getMessagein classThrowable
-
getLocalizedMessage
public String 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
-
-