org.sonar.api.utils
Class MessageException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.sonar.api.utils.MessageException
- All Implemented Interfaces:
- Serializable
public class MessageException
- extends RuntimeException
Runtime exception for "functional" error. It aims to be displayed to end-users, without any technical information
like stack traces. It requires sonar-runner 2.4. Previous versions log stack trace.
Note that by design Maven still logs the stack trace when the option -e is set.
Message should be clear and complete. Keep in mind that context is not added to the exception.
Names of processed resource and decorator are for example not automatically added when throwing MessageException
from Decorator
.
- Since:
- 3.7.1
- See Also:
- Serialized Form
of
public static MessageException of(String message)
ofL10n
public static MessageException ofL10n(String l10nKey,
Object... l10nParams)
fillInStackTrace
public Throwable fillInStackTrace()
- Does not fill in the stack trace
- Overrides:
fillInStackTrace
in class Throwable
- See Also:
Throwable.fillInStackTrace()
toString
public String toString()
- Overrides:
toString
in class Throwable
l10nKey
@CheckForNull
public String l10nKey()
l10nParams
@CheckForNull
public Collection<Object> l10nParams()
Copyright © 2009-2013 SonarSource. All Rights Reserved.