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.

Direct Known Subclasses

FXStreamAllocError, FXStreamEndError, FXStreamFailureError, FXStreamFormatError, FXStreamFullError, FXStreamNoReadError, FXStreamNoWriteError, FXStreamUnknownError

Class Method Summary (collapse)

Class Method Details

+ (Object) makeStreamError(status)

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



469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
# File 'lib/fox16/core.rb', line 469

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