Exception: Parse::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Parse::Error
- Defined in:
- lib/parse/model/core/errors.rb,
lib/parse/stack.rb,
lib/parse/client.rb,
lib/parse/model/classes/user.rb
Overview
An abstract parent class for all Parse::Error types.
Supports both legacy single-argument construction (‘raise Parse::Error, “msg”`) and two-argument construction with a Parse error code (`raise Parse::Error.new(code, “msg”)`). When a code is provided it is exposed via #code and prefixed onto the message.
Direct Known Subclasses
Client::ResponseError, CreateLockInvalidKey, CreateLockTimeoutError, CreateLockUnavailableError, AuthenticationError, CloudCodeError, ConnectionError, EmailMissing, EmailNotFound, EmailTakenError, InvalidEmailAddress, InvalidSessionTokenError, PasswordMissingError, ProtocolError, RequestLimitExceededError, ServerError, ServiceUnavailableError, TimeoutError, UsernameMissingError, UsernameTakenError, File::UntrustedHostError, LiveQuery::Error, MFA::AlreadyEnabledError, MFA::DependencyError, MFA::ForbiddenError, MFA::NotEnabledError, MFA::RequiredError, MFA::VerificationError, PipelineSecurity::Error, UnfetchedFieldAccessError
Defined Under Namespace
Classes: AuthenticationError, CloudCodeError, ConnectionError, EmailMissing, EmailNotFound, EmailTakenError, InvalidEmailAddress, InvalidSessionTokenError, PasswordMissingError, ProtocolError, RequestLimitExceededError, ServerError, ServiceUnavailableError, TimeoutError, UsernameMissingError, UsernameTakenError
Instance Attribute Summary collapse
-
#code ⇒ Integer, ...
readonly
The Parse error code when constructed with one.
Instance Method Summary collapse
-
#initialize(code_or_message = nil, message = nil) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(code_or_message = nil, message = nil) ⇒ Error
Returns a new instance of Error.
16 17 18 19 20 21 22 23 |
# File 'lib/parse/model/core/errors.rb', line 16 def initialize( = nil, = nil) if .nil? super() else @code = super("[#{}] #{}") end end |
Instance Attribute Details
#code ⇒ Integer, ... (readonly)
Returns the Parse error code when constructed with one.
14 15 16 |
# File 'lib/parse/model/core/errors.rb', line 14 def code @code end |