22 #import <Foundation/Foundation.h>
27 #pragma mark Class Constants
37 #define SCStreamExceptionClass @"SCStreamException"
43 #define SCStreamErrorName @"SCStream"
47 #pragma mark Error ID Constants
57 #define SCStreamEIDUnspecified @"SCL-20020"
63 #define SCStreamEIDNotOpen @"SCL-20021"
69 #define SCStreamEIDReadOnly @"SCL-20022"
75 #define SCStreamEIDWriteOnly @"SCL-20023"
81 #define SCStreamEIDUnknown @"SCL-20024"
87 #define SCStreamEIDUnexpected @"SCL-20025"
93 #define SCStreamEIDUnsupported @"SCL-20026"
99 #define SCStreamEIDIncompleteReading @"SCL-20027"
105 #define SCStreamEIDIncompleteWriting @"SCL-20028"
111 #define SCStreamEIDOpening @"SCL-20029"
117 #define SCStreamEIDRead @"SCL-20030"
123 #define SCStreamEIDWrite @"SCL-20031"
129 #define SCStreamEIDNumber @"SCL-20032"
135 #define SCStreamEIDOpenMode @"SCL-20033"
141 #define SCStreamEIDEmptyPath @"SCL-20034"
147 #define SCStreamEIDEOF @"SCL-20035"
153 #define SCStreamEIDOffset @"SCL-20036"
159 #define SCStreamEIDOffsetWhence @"SCL-20037"
163 #pragma mark Class Support Types
344 NSString *fStreamName;
346 NSString *fUnexpected;
348 NSString *fUnsupported;
355 NSString *fNumberType;
363 #pragma mark Instance Properties
373 @property (nonatomic, readonly, retain) NSString *streamName;
379 @property (nonatomic, readonly, retain) NSString *unknown;
385 @property (nonatomic, readonly, retain) NSString *unexpected;
391 @property (nonatomic, readonly, retain) NSString *expected;
397 @property (nonatomic, readonly, retain) NSString *unsupported;
403 @property (nonatomic, readonly, assign)
SCSize readedBytes;
409 @property (nonatomic, readonly, assign)
SCSize writedBytes;
415 @property (nonatomic, readonly, assign)
SCSize waitedBytes;
421 @property (nonatomic, readonly, assign)
SCInteger openError;
427 @property (nonatomic, readonly, assign)
SCInteger readError;
433 @property (nonatomic, readonly, assign)
SCInteger writeError;
439 @property (nonatomic, readonly, retain) NSString *numberType;
457 @property (nonatomic, readonly, assign) NSInteger offset;
468 #pragma mark Creating and Initializing the Generic Stream Exceptions (SCL-20020)
469 + (instancetype)exceptionWithStream:(NSString *)stream
470 reason:(NSString *)reason
473 + (instancetype)exceptionWithReason:(NSString *)reason code:(
SCInteger)code eid:(NSString *)eid;
474 + (instancetype)exceptionWithStream:(NSString *)stream;
475 + (instancetype)exception;
476 - (instancetype)initWithStream:(NSString *)stream reason:(NSString *)reason code:(
SCInteger)code eid:(NSString *)eid;
477 - (instancetype)initWithReason:(NSString *)reason code:(
SCInteger)code eid:(NSString *)eid;
478 - (instancetype)initWithStreamName:(NSString *)stream;
479 - (instancetype)init;
482 #pragma mark Creating and Initializing Not Open Stream Exception (SCL-20021)
483 + (instancetype)exceptionWithNotOpenStream:(NSString *)stream;
484 + (instancetype)exceptionWithNotOpen;
485 - (instancetype)initWithNotOpenStream:(NSString *)stream;
486 - (instancetype)initWithNotOpen;
489 #pragma mark Creating and Initializing Read Only Stream Exception (SCL-20022)
490 + (instancetype)exceptionWithReadOnlyStream:(NSString *)stream;
491 + (instancetype)exceptionWithReadOnly;
492 - (instancetype)initWithReadOnlyStream:(NSString *)stream;
493 - (instancetype)initWithReadOnly;
496 #pragma mark Creating and Initializing Write Only Stream Exception (SCL-20023)
497 + (instancetype)exceptionWithWriteOnlyStream:(NSString *)stream;
498 + (instancetype)exceptionWithWriteOnly;
499 - (instancetype)initWithWriteOnlyStream:(NSString *)stream;
500 - (instancetype)initWithWriteOnly;
503 #pragma mark Creating and Initializing Unknown Class Exception (SCL-20024)
504 + (instancetype)exceptionWithUnknown:(NSString *)name stream:(NSString *)stream;
505 + (instancetype)exceptionWithUnknown:(NSString *)name;
506 - (instancetype)initWithUnknown:(NSString *)name stream:(NSString *)stream;
507 - (instancetype)initWithUnknown:(NSString *)name;
510 #pragma mark Creating and Initializing Unexpected Class Exception (SCL-20025)
511 + (instancetype)exceptionWithUnexpected:(NSString *)unexpected expected:(NSString *)expected stream:(NSString *)stream;
512 + (instancetype)exceptionWithUnexpected:(NSString *)unexpected expected:(NSString *)expected;
513 - (instancetype)initWithUnexpected:(NSString *)unexpected expected:(NSString *)expected stream:(NSString *)stream;
514 - (instancetype)initWithUnexpected:(NSString *)unexpected expected:(NSString *)expected;
517 #pragma mark Creating and Initializing Unsupported Class Exception (SCL-20026)
518 + (instancetype)exceptionWithUnsupported:(NSString *)name stream:(NSString *)stream;
519 + (instancetype)exceptionWithUnsupported:(NSString *)name;
520 - (instancetype)initWithUnsupported:(NSString *)name stream:(NSString *)stream;
521 - (instancetype)initWithUnsupported:(NSString *)name;
524 #pragma mark Creating and Initializing Incompleted Operation Exception (SCL-20027 and SCL-20028)
525 + (instancetype)exceptionWithReaded:(
SCSize)readed waited:(
SCSize)waited stream:(NSString *)stream;
526 + (instancetype)exceptionWithReaded:(
SCSize)readed waited:(
SCSize)waited;
527 + (instancetype)exceptionWithWrited:(
SCSize)writed waited:(
SCSize)waited stream:(NSString *)stream;
528 + (instancetype)exceptionWithWrited:(
SCSize)writed waited:(
SCSize)waited;
529 - (instancetype)initWithReaded:(
SCSize)readed waited:(
SCSize)waited stream:(NSString *)stream;
530 - (instancetype)initWithReaded:(
SCSize)readed waited:(
SCSize)waited;
531 - (instancetype)initWithWrited:(
SCSize)writed waited:(
SCSize)waited stream:(NSString *)stream;
532 - (instancetype)initWithWrited:(
SCSize)writed waited:(
SCSize)waited;
535 #pragma mark Creating and Initializing Opening Exception (SCL-20029)
536 + (instancetype)exceptionWithOpenError:(
SCInteger)error stream:(NSString *)stream;
537 + (instancetype)exceptionWithOpenError:(
SCInteger)error;
538 - (instancetype)initWithOpenError:(
SCInteger)error stream:(NSString *)stream;
539 - (instancetype)initWithOpenError:(
SCInteger)error;
542 #pragma mark Creating and Initializing Reading Exception (SCL-20030)
543 + (instancetype)exceptionWithReadError:(
SCInteger)error stream:(NSString *)stream;
544 + (instancetype)exceptionWithReadError:(
SCInteger)error;
545 - (instancetype)initWithReadError:(
SCInteger)error stream:(NSString *)stream;
546 - (instancetype)initWithReadError:(
SCInteger)error;
549 #pragma mark Creating and Initializing Writing Exception (SCL-20031)
550 + (instancetype)exceptionWithWriteError:(
SCInteger)error stream:(NSString *)stream;
551 + (instancetype)exceptionWithWriteError:(
SCInteger)error;
552 - (instancetype)initWithWriteError:(
SCInteger)error stream:(NSString *)stream;
553 - (instancetype)initWithWriteError:(
SCInteger)error;
556 #pragma mark Creating and Initializing Number Object Exception (SCL-20032)
557 + (instancetype)exceptionWithUnsupportedNumberType:(NSString *)type stream:(NSString *)stream;
558 + (instancetype)exceptionWithUnsupportedNumberType:(NSString *)type;
559 - (instancetype)initWithUnsupportedNumberType:(NSString *)type stream:(NSString *)stream;
560 - (instancetype)initWithUnsupportedNumberType:(NSString *)type;
563 #pragma mark Creating and Initializing Incorrect Open Mode Exception (SCL-20033)
570 #pragma mark Creating and Initializing Empty Path Exception (SCL-20034)
571 + (instancetype)exceptionWithEmptyPath;
572 - (instancetype)initWithEmptyPath;
575 #pragma mark Creating and Initializing End of Stream Exception (SCL-20035)
576 + (instancetype)exceptionWithEndOfFile:(NSString *)file;
577 + (instancetype)exceptionWithEndOfFile;
578 - (instancetype)initWithEndOfFile:(NSString *)file;
579 - (instancetype)initWithEndOfFile;
582 #pragma mark Creating and Initializing Offset Exception (SCL-20036 and SCL-20037)
585 offset:(NSInteger)offset
586 path:(NSString *)path;
589 offset:(NSInteger)offset;
590 + (instancetype)exceptionWithSeekError:(
SCSystemError)error path:(NSString *)path;
596 offset:(NSInteger)offset
597 path:(NSString *)path;
599 - (instancetype)initWithSeekError:(
SCSystemError)error path:(NSString *)path;
Definition: SCStreamException.h:274
Definition: SCStreamException.h:268
Definition: SCStreamException.h:178
Class SCFileStream header file.
Definition: SCStreamException.h:202
Definition: SCStreamException.h:232
int32_t SCInteger
Definition: SCTypes.h:49
SCStreamErrorCode
Definition: SCStreamException.h:173
Definition: SCStreamException.h:280
Parent class of all library exceptions.
Definition: SCException.h:72
SCFileStreamOpenMode
Definition: SCFileStream.h:97
Definition: SCStreamException.h:214
Definition: SCStreamException.h:190
SCFileStreamOffsetWhence
Definition: SCFileStream.h:172
Definition: SCStreamException.h:262
Definition: SCStreamException.h:226
Definition: SCStreamException.h:256
Definition: SCStreamException.h:184
Definition: SCStreamException.h:220
SCInteger SCSystemError
Definition: SCSystemException.h:83
Definition: SCStreamException.h:244
SCInteger SCStreamError
Definition: SCStreamException.h:288
Definition: SCStreamException.h:238
Exception class SCStreamException.
Definition: SCStreamException.h:343
Exception SCException header file.
Definition: SCStreamException.h:196
Definition: SCStreamException.h:208
size_t SCSize
Definition: SCTypes.h:214
Definition: SCStreamException.h:250