Class CaldavPushException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.exoplatform.caldav.service.CaldavPushException
All Implemented Interfaces:
Serializable

public class CaldavPushException extends RuntimeException
A push that could not be carried out, carrying the machine-readable code the browser already knows how to turn into a message the user can act on.

The codes are the connector's own — caldav.error.credentials, conflict, save, noCalendar, calendarCreationRefused — kept identical on purpose. The browser stops building iCalendar in this PR but keeps rendering the failures, and a renamed code would silently degrade every one of them into the generic message.

Not every code is a failure, whatever this class is called. Some describe a state of the subject that no retry changes — a user who never connected an account, one who has not said where their copies go — and those are recorded at debug, without a trace, rather than as incidents nobody can act on. CaldavPushService.isKnownState(java.lang.String) draws the line, and a code left out of it is a failure: see the two sets declared under the vocabulary there, which a new code has to join one of.

See Also:
  • Constructor Details

    • CaldavPushException

      public CaldavPushException(String code, String message)
      Parameters:
      code - the stable failure code
      message - what went wrong, for the log
    • CaldavPushException

      public CaldavPushException(String code, String message, Throwable cause)
      Parameters:
      code - the stable failure code
      message - what went wrong, for the log
      cause - the underlying failure
  • Method Details

    • getCode

      public String getCode()
      The stable code the front end matches on.
      Returns:
      the code