Exception: FestivalError

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/festivaltts4r/festival4r.rb

Overview

A generic application error wrapper for festivaltts4r

Direct Known Subclasses

FestivalSystemError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(e) ⇒ FestivalError

Creates a new FestivalError with message and original_exception



79
80
81
82
83
84
# File 'lib/festivaltts4r/festival4r.rb', line 79

def initialize(e)
  exception = e.class == String ? StandardError.new(e) : e
  @original_exception = exception
  message = "festivaltts4r error: #{exception.message} (#{exception.class})"
  super message
end

Instance Attribute Details

#original_exceptionObject

The original exception



74
75
76
# File 'lib/festivaltts4r/festival4r.rb', line 74

def original_exception
  @original_exception
end