Class: Onlyoffice::DocsIntegrationSdk::DocumentServer::Client::ConversionService::Error

Inherits:
T::Enum
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/onlyoffice/docs_integration_sdk/document_server/client/conversion.rb

Overview

Error is an enum that represents the possible errors that can occur when using the conversion service.

Since:

  • 0.1.0

Constant Summary collapse

UnknownError =

Since:

  • 0.1.0

new(-1)
ConversionTimeout =

Since:

  • 0.1.0

new(-2)
ConversionError =

Since:

  • 0.1.0

new(-3)
DownloadError =

Since:

  • 0.1.0

new(-4)
IncorrectPassword =

Since:

  • 0.1.0

new(-5)
DatabaseError =

Since:

  • 0.1.0

new(-6)
InputError =

Since:

  • 0.1.0

new(-7)
InvalidToken =

Since:

  • 0.1.0

new(-8)
UnknownFormat =

Since:

  • 0.1.0

new(-9)
SizeLimitExceeded =

Since:

  • 0.1.0

new(-10)

Instance Method Summary collapse

Instance Method Details

#description ⇒ String

description returns the human-readable description of the error.

Returns:

  • (String)

Since:

  • 0.1.0



93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# File 'lib/onlyoffice/docs_integration_sdk/document_server/client/conversion.rb', line 93

def description
  case self
  when UnknownError
    "Unknown error"
  when ConversionTimeout
    "Conversion timeout error"
  when ConversionError
    "Conversion error"
  when DownloadError
    "Error while downloading the document file to be converted"
  when IncorrectPassword
    "Incorrect password"
  when DatabaseError
    "Error while accessing the conversion result database"
  when InputError
    "Input error"
  when InvalidToken
    "Invalid token"
  when UnknownFormat
    "The converter cannot automatically determine the output file format"
  when SizeLimitExceeded
    "Size limit exceeded"
  else
    # :nocov:
    # unreachable
    # :nocov:
  end
end