RubyScript: added error processing