26 #pragma mark Class Constants
36 #define SCStreamExceptionClass @"SCStreamException"
42 #define SCStreamErrorName @"SCStream"
46 #pragma mark Error ID Constants
56 #define SCStreamEIDUnspecified @"SCL-20020"
62 #define SCStreamEIDNotOpen @"SCL-20021"
68 #define SCStreamEIDReadOnly @"SCL-20022"
74 #define SCStreamEIDWriteOnly @"SCL-20023"
80 #define SCStreamEIDUnknown @"SCL-20024"
86 #define SCStreamEIDUnexpected @"SCL-20025"
92 #define SCStreamEIDUnsupported @"SCL-20026"
98 #define SCStreamEIDIncompleteReading @"SCL-20027"
104 #define SCStreamEIDIncompleteWriting @"SCL-20028"
110 #define SCStreamEIDOpening @"SCL-20029"
116 #define SCStreamEIDRead @"SCL-20030"
122 #define SCStreamEIDWrite @"SCL-20031"
128 #define SCStreamEIDNumber @"SCL-20032"
134 #define SCStreamEIDOpenMode @"SCL-20033"
140 #define SCStreamEIDEmptyPath @"SCL-20034"
146 #define SCStreamEIDEOF @"SCL-20035"
152 #define SCStreamEIDOffset @"SCL-20036"
158 #define SCStreamEIDOffsetWhence @"SCL-20037"
162 #pragma mark Class Support Types
343 NSString *fStreamName;
345 NSString *fUnexpected;
347 NSString *fUnsupported;
354 NSString *fNumberType;
362 #pragma mark Instance Properties
372 @property (nonatomic, readonly, retain) NSString *streamName;
378 @property (nonatomic, readonly, retain) NSString *unknown;
384 @property (nonatomic, readonly, retain) NSString *unexpected;
390 @property (nonatomic, readonly, retain) NSString *expected;
396 @property (nonatomic, readonly, retain) NSString *unsupported;
402 @property (nonatomic, readonly, assign)
SCSize readedBytes;
408 @property (nonatomic, readonly, assign)
SCSize writedBytes;
414 @property (nonatomic, readonly, assign)
SCSize waitedBytes;
420 @property (nonatomic, readonly, assign)
SCInteger openError;
426 @property (nonatomic, readonly, assign)
SCInteger readError;
432 @property (nonatomic, readonly, assign)
SCInteger writeError;
438 @property (nonatomic, readonly, retain) NSString *numberType;
456 @property (nonatomic, readonly, assign) NSInteger offset;
467 #pragma mark Creating and Initializing the Generic Stream Exceptions (SCL-20020)
468 + (instancetype)exceptionWithStream:(NSString *)stream
469 reason:(NSString *)reason
472 + (instancetype)exceptionWithReason:(NSString *)reason code:(
SCInteger)code eid:(NSString *)eid;
473 + (instancetype)exceptionWithStream:(NSString *)stream;
474 + (instancetype)exception;
475 - (instancetype)initWithStream:(NSString *)stream reason:(NSString *)reason code:(
SCInteger)code eid:(NSString *)eid;
476 - (instancetype)initWithReason:(NSString *)reason code:(
SCInteger)code eid:(NSString *)eid;
477 - (instancetype)initWithStreamName:(NSString *)stream;
478 - (instancetype)init;
481 #pragma mark Creating and Initializing Not Open Stream Exception (SCL-20021)
482 + (instancetype)exceptionWithNotOpenStream:(NSString *)stream;
483 + (instancetype)exceptionWithNotOpen;
484 - (instancetype)initWithNotOpenStream:(NSString *)stream;
485 - (instancetype)initWithNotOpen;
488 #pragma mark Creating and Initializing Read Only Stream Exception (SCL-20022)
489 + (instancetype)exceptionWithReadOnlyStream:(NSString *)stream;
490 + (instancetype)exceptionWithReadOnly;
491 - (instancetype)initWithReadOnlyStream:(NSString *)stream;
492 - (instancetype)initWithReadOnly;
495 #pragma mark Creating and Initializing Write Only Stream Exception (SCL-20023)
496 + (instancetype)exceptionWithWriteOnlyStream:(NSString *)stream;
497 + (instancetype)exceptionWithWriteOnly;
498 - (instancetype)initWithWriteOnlyStream:(NSString *)stream;
499 - (instancetype)initWithWriteOnly;
502 #pragma mark Creating and Initializing Unknown Class Exception (SCL-20024)
503 + (instancetype)exceptionWithUnknown:(NSString *)name stream:(NSString *)stream;
504 + (instancetype)exceptionWithUnknown:(NSString *)name;
505 - (instancetype)initWithUnknown:(NSString *)name stream:(NSString *)stream;
506 - (instancetype)initWithUnknown:(NSString *)name;
509 #pragma mark Creating and Initializing Unexpected Class Exception (SCL-20025)
510 + (instancetype)exceptionWithUnexpected:(NSString *)unexpected expected:(NSString *)expected stream:(NSString *)stream;
511 + (instancetype)exceptionWithUnexpected:(NSString *)unexpected expected:(NSString *)expected;
512 - (instancetype)initWithUnexpected:(NSString *)unexpected expected:(NSString *)expected stream:(NSString *)stream;
513 - (instancetype)initWithUnexpected:(NSString *)unexpected expected:(NSString *)expected;
516 #pragma mark Creating and Initializing Unsupported Class Exception (SCL-20026)
517 + (instancetype)exceptionWithUnsupported:(NSString *)name stream:(NSString *)stream;
518 + (instancetype)exceptionWithUnsupported:(NSString *)name;
519 - (instancetype)initWithUnsupported:(NSString *)name stream:(NSString *)stream;
520 - (instancetype)initWithUnsupported:(NSString *)name;
523 #pragma mark Creating and Initializing Incompleted Operation Exception (SCL-20027 and SCL-20028)
524 + (instancetype)exceptionWithReaded:(
SCSize)readed waited:(
SCSize)waited stream:(NSString *)stream;
525 + (instancetype)exceptionWithReaded:(
SCSize)readed waited:(
SCSize)waited;
526 + (instancetype)exceptionWithWrited:(
SCSize)writed waited:(
SCSize)waited stream:(NSString *)stream;
527 + (instancetype)exceptionWithWrited:(
SCSize)writed waited:(
SCSize)waited;
528 - (instancetype)initWithReaded:(
SCSize)readed waited:(
SCSize)waited stream:(NSString *)stream;
529 - (instancetype)initWithReaded:(
SCSize)readed waited:(
SCSize)waited;
530 - (instancetype)initWithWrited:(
SCSize)writed waited:(
SCSize)waited stream:(NSString *)stream;
531 - (instancetype)initWithWrited:(
SCSize)writed waited:(
SCSize)waited;
534 #pragma mark Creating and Initializing Opening Exception (SCL-20029)
535 + (instancetype)exceptionWithOpenError:(
SCInteger)error stream:(NSString *)stream;
536 + (instancetype)exceptionWithOpenError:(
SCInteger)error;
537 - (instancetype)initWithOpenError:(
SCInteger)error stream:(NSString *)stream;
538 - (instancetype)initWithOpenError:(
SCInteger)error;
541 #pragma mark Creating and Initializing Reading Exception (SCL-20030)
542 + (instancetype)exceptionWithReadError:(
SCInteger)error stream:(NSString *)stream;
543 + (instancetype)exceptionWithReadError:(
SCInteger)error;
544 - (instancetype)initWithReadError:(
SCInteger)error stream:(NSString *)stream;
545 - (instancetype)initWithReadError:(
SCInteger)error;
548 #pragma mark Creating and Initializing Writing Exception (SCL-20031)
549 + (instancetype)exceptionWithWriteError:(
SCInteger)error stream:(NSString *)stream;
550 + (instancetype)exceptionWithWriteError:(
SCInteger)error;
551 - (instancetype)initWithWriteError:(
SCInteger)error stream:(NSString *)stream;
552 - (instancetype)initWithWriteError:(
SCInteger)error;
555 #pragma mark Creating and Initializing Number Object Exception (SCL-20032)
556 + (instancetype)exceptionWithUnsupportedNumberType:(NSString *)type stream:(NSString *)stream;
557 + (instancetype)exceptionWithUnsupportedNumberType:(NSString *)type;
558 - (instancetype)initWithUnsupportedNumberType:(NSString *)type stream:(NSString *)stream;
559 - (instancetype)initWithUnsupportedNumberType:(NSString *)type;
562 #pragma mark Creating and Initializing Incorrect Open Mode Exception (SCL-20033)
569 #pragma mark Creating and Initializing Empty Path Exception (SCL-20034)
570 + (instancetype)exceptionWithEmptyPath;
571 - (instancetype)initWithEmptyPath;
574 #pragma mark Creating and Initializing End of Stream Exception (SCL-20035)
575 + (instancetype)exceptionWithEndOfFile:(NSString *)file;
576 + (instancetype)exceptionWithEndOfFile;
577 - (instancetype)initWithEndOfFile:(NSString *)file;
578 - (instancetype)initWithEndOfFile;
581 #pragma mark Creating and Initializing Offset Exception (SCL-20036 and SCL-20037)
584 offset:(NSInteger)offset
585 path:(NSString *)path;
588 offset:(NSInteger)offset;
589 + (instancetype)exceptionWithSeekError:(
SCSystemError)error path:(NSString *)path;
595 offset:(NSInteger)offset
596 path:(NSString *)path;
598 - (instancetype)initWithSeekError:(
SCSystemError)error path:(NSString *)path;
Definition: SCStreamException.h:273
Definition: SCStreamException.h:267
Definition: SCStreamException.h:177
Class SCFileStream header file.
Definition: SCStreamException.h:201
Definition: SCStreamException.h:231
int32_t SCInteger
Definition: SCTypes.h:52
SCStreamErrorCode
Definition: SCStreamException.h:172
Definition: SCStreamException.h:279
Parent class of all library exceptions.
Definition: SCException.h:71
SCFileStreamOpenMode
Definition: SCFileStream.h:96
Definition: SCStreamException.h:213
Definition: SCStreamException.h:189
SCFileStreamOffsetWhence
Definition: SCFileStream.h:171
Definition: SCStreamException.h:261
Definition: SCStreamException.h:225
Definition: SCStreamException.h:255
Definition: SCStreamException.h:183
Definition: SCStreamException.h:219
SCInteger SCSystemError
Definition: SCSystemException.h:82
Definition: SCStreamException.h:243
SCInteger SCStreamError
Definition: SCStreamException.h:287
Definition: SCStreamException.h:237
Exception class SCStreamException.
Definition: SCStreamException.h:342
Exception SCException header file.
Definition: SCStreamException.h:195
Definition: SCStreamException.h:207
size_t SCSize
Definition: SCTypes.h:209
Definition: SCStreamException.h:249