Annotation Type Error


  • @InterceptorBinding
    @Documented
    @Target({TYPE,METHOD})
    @Retention(RUNTIME)
    @Inherited
    public @interface Error
    An annotation applicable to methods and types for which you wish to trace the exceptions occurring within the execution of the method. Only DI managed bean are taken in charge by the processor of this annotation.
    Author:
    mmoquillon
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      String message
      A message to record into the log.
      boolean rethrown
      A flag indicating if the caught exception has to be rethrown once the message recording into the log.
    • Element Detail

      • message

        String message
        A message to record into the log. If not set, the default message will be the message of the caught exception. If set, this message will be used instead. In order to write the message with the method parameters, a pattern of such a message can be provided here. For doing, the pattern has to follow the pattern rules of MessageFormat with two additional variable placeholders:
        • {e} for displaying the exception itself (exception stacktrace),
        • {m} for displaying the message of the exception.
        Hence, for example, with a pattern like "Error in process instance {1} for {0}: {m}", the resulting message will have in it, at the variable placeholders, the value of the second parameter of the method, followed by the value of the first one, and then the message of the caught exception.
        Returns:
        a message or a pattern of a message to record or an empty string to use the default message.
        Default:
        ""
      • rethrown

        boolean rethrown
        A flag indicating if the caught exception has to be rethrown once the message recording into the log. If false, and if the method returns a value, the returned value of the method will be automatically null.
        Returns:
        true if the error has to be reported, false otherwise. By default true.
        Default:
        true