Exception: S7::CommandFailed

Inherits:
ApplicationError show all
Defined in:
lib/s7/exception.rb

Overview

OS のコマンドの実行に失敗したことを表現する例外クラス。

Instance Method Summary collapse

Methods included from GetText

#N_, #_, bindtextdomain, included

Constructor Details

#initialize(command, status) ⇒ CommandFailed

command

失敗したコマンド

status

コマンドの終了ステータス



107
108
109
110
# File 'lib/s7/exception.rb', line 107

def initialize(command, status)
  @command = command
  @status = status
end

Instance Method Details

#to_sObject



112
113
114
# File 'lib/s7/exception.rb', line 112

def to_s
  return _("Failed the command: command=<%s> status=<%d>") % [@command, @status]
end