Class: CPInvalidRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/crowi/client/apireq/api_request_base.rb

Overview

Note:

rescue する必要はないので Exception クラスは継承しない

APIリクエストのバリデーションエラー

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg) ⇒ CPInvalidRequest

コンストラクタ

Parameters:

  • msg (String)

    エラーメッセージ(原因と対策が分かるとよい)



8
9
10
# File 'lib/crowi/client/apireq/api_request_base.rb', line 8

def initialize(msg)
  @msg = msg
end

Instance Attribute Details

#msgObject (readonly)

Returns the value of attribute msg.



4
5
6
# File 'lib/crowi/client/apireq/api_request_base.rb', line 4

def msg
  @msg
end

Instance Method Details

#to_sString

Convert string

Returns:

  • (String)

    Message



14
15
16
# File 'lib/crowi/client/apireq/api_request_base.rb', line 14

def to_s
  return @msg
end