Exception: Fox::FXStreamError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/fox16/core.rb

Overview

FXStreamError is the base class for exceptions which can occur when working with FXStream and its subclasses.

Class Method Summary collapse

Class Method Details

.makeStreamError(status) ⇒ Object

This is a factory method that takes an FXStreamStatus code as its input and returns the appropriate exception class.



422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
# File 'lib/fox16/core.rb', line 422

def FXStreamError.makeStreamError(status)
  case status
	when FXStreamEnd
	  FXStreamEndError
	when FXStreamFull
	  FXStreamFullError
	when FXStreamNoWrite
	  FXStreamNoWriteError
	when FXStreamNoRead
	  FXStreamNoReadError
	when FXStreamFormat
	  FXStreamFormatError
	when FXStreamUnknown
	  FXStreamUnknownError
	when FXStreamAlloc
	  FXStreamAllocError
	when FXStreamFailure
	  FXStreamFailureError
	else
	  FXStreamError
  end
end