lv.eparaksts.pdf

## Class PdfException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - lv.eparaksts.pdf.PdfException

- All Implemented Interfaces:
    Serializable

      public class PdfException
      extends Exception

  A `PdfException` represents general PDF API exception. The exception specifies commonly used reason constants.
  See Also:
    `PdfDocument`, Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `REASON_BAD_FORMAT` Invalid PDF format.
    `static int` | `REASON_ENCRYPTION` PDF encryption.
    `static int` | `REASON_FILE_WRITE_ACCESS` File write access error.
    `static int` | `REASON_GENERAL` General error.
    `static int` | `REASON_INVALID_PASSWORD` Invalid PDF password.
    `static int` | `REASON_IO` IO error.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PdfException(String message, int reason)`
    `PdfException(String message, Throwable cause, int reason)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getMessage()`
    `int` | `getReason()` Returns reason code of the exception.

    - ### Methods inherited from class java.lang.Throwable

      `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### REASON_GENERAL

          public static final int REASON_GENERAL

      General error.
      See Also:
        Constant Field Values

    - #### REASON_IO

          public static final int REASON_IO

      IO error.
      See Also:
        Constant Field Values

    - #### REASON_FILE_WRITE_ACCESS

          public static final int REASON_FILE_WRITE_ACCESS

      File write access error.
      See Also:
        Constant Field Values

    - #### REASON_BAD_FORMAT

          public static final int REASON_BAD_FORMAT

      Invalid PDF format.
      See Also:
        Constant Field Values

    - #### REASON_INVALID_PASSWORD

          public static final int REASON_INVALID_PASSWORD

      Invalid PDF password.
      See Also:
        Constant Field Values

    - #### REASON_ENCRYPTION

          public static final int REASON_ENCRYPTION

      PDF encryption.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### PdfException

          public PdfException(String message,
                              int reason)

    - #### PdfException

          public PdfException(String message,
                              Throwable cause,
                              int reason)

  - ### Method Detail

    - #### getReason

          public int getReason()

      Returns reason code of the exception.
      Returns:
        reason code

    - #### getMessage

          public String getMessage()

      Overrides:
        `getMessage` in class `Throwable`

Copyright VAS Latvijas Valsts radio un televizijas centrs / Developed by SIA EUSO