Exception: Pdi::Spoon::PanError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/pdi/spoon/pan_error.rb

Overview

This class subclasses Ruby’s StandardError and provides a mapping to custom Pan specific error codes to messages. You can find the list of errors in Pentaho’s documentation site, for example: help.pentaho.com/Documentation/8.0/Products/Data_Integration/Command_Line_Tools

Constant Summary collapse

MESSAGES =
{
  '1' => 'Errors occurred during processing',
  '2' => 'An unexpected error occurred during loading / running of the transformation',
  '3' => 'Unable to prepare and initialize this transformation',
  '7' => "The transformation couldn't be loaded from XML or the Repository",
  '8' => 'Error loading steps or plugins (error in loading one of the plugins mostly)',
  '9' => 'Command line usage printing'
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(execution) ⇒ PanError

Returns a new instance of PanError.



28
29
30
31
32
33
34
# File 'lib/pdi/spoon/pan_error.rb', line 28

def initialize(execution)
  @execution = execution

  message = MESSAGES[execution.code.to_s] || 'Unknown'

  super(message)
end

Instance Attribute Details

#executionObject (readonly)

Returns the value of attribute execution.



26
27
28
# File 'lib/pdi/spoon/pan_error.rb', line 26

def execution
  @execution
end