Package org.jcsp.util.ints
Class BufferIntSizeError
java.lang.Object
java.lang.Throwable
java.lang.Error
org.jcsp.util.ints.BufferIntSizeError
- All Implemented Interfaces:
Serializable
This is thrown if an attempt is made to create some variety of buffered channel
with a zero or negative sized buffer.
Description
Buffered channels must have (usually non-zero) positive sized buffers. The following constructions will all throw thisError
:
One2OneChannelInt c = Channel.one2oneInt (new BufferInt (-42)); // must be >= 0 One2OneChannelInt c = Channel.one2oneInt (new OverFlowingBufferInt (-42)); // must be > 0 One2OneChannelInt c = Channel.one2oneInt (new OverWriteOldestBufferInt (-42)); // must be > 0 One2OneChannelInt c = Channel.one2oneInt (new OverWritingBufferInt (-42)); // must be > 0 One2OneChannelInt c = Channel.one2oneInt (new InfiniteBufferInt (-42)); // must be > 0Zero-buffered non-overwriting channels are, of course, the default channel semantics. The following constructions are all legal and equivalent:
One2OneChannelInt c = Channel.one2oneInt (); One2OneChannelInt c = Channel.one2oneInt (new ZeroBufferInt ()); // less efficient One2OneChannelInt c = Channel.one2oneInt (new BufferInt (0)); // less efficientNo action should be taken to catch BufferSizeError. Application code generating it is in error and needs correcting.
- Author:
- P.H. Welch
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a newBufferIntSizeError
with the specified detail message. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
BufferIntSizeError
Constructs a newBufferIntSizeError
with the specified detail message.- Parameters:
s
- the detail message.
-