steghide  0.5.1
error.h
Go to the documentation of this file.
1 /*
2  * steghide 0.5.1 - a steganography program
3  * Copyright (C) 1999-2003 Stefan Hetzl <shetzl@chello.at>
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License
7  * as published by the Free Software Foundation; either version 2
8  * of the License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18  *
19  */
20 
21 #ifndef SH_ERROR_H
22 #define SH_ERROR_H
23 
24 #include <cstdio>
25 #include <string>
26 
27 #include "SteghideError.h"
28 
29 class BinaryIO ;
30 
31 class ArgError : public SteghideError {
32  public:
33  ArgError (const char *msgfmt, ...) ;
34 
35  void printMessage (void) const ;
36 } ;
37 
39  public:
41 
42  BinaryInputError (std::string fn, FILE* s) ;
43 
44  TYPE getType (void) ;
45 
46  protected:
47  void setType (TYPE t) ;
48 
49  private:
51 } ;
52 
54  public:
55  enum TYPE { FILE_ERR, STDOUT_ERR } ;
56 
57  BinaryOutputError (std::string fn) ;
58 
59  TYPE getType (void) ;
60 
61  protected:
62  void setType (TYPE t) ;
63 
64  private:
66 } ;
67 
69  public:
71 } ;
72 
74  public:
75  NotImplementedError (const char* msgfmt, ...) ;
76 
77  void printMessage (void) const ;
78 } ;
79 
87  public:
88  CorruptDataError (const char* msgfmt, ...) ;
89 
90  void printMessage (void) const ;
91 } ;
92 
93 #endif
BinaryInputError::STDIN_EOF
@ STDIN_EOF
Definition: error.h:40
SteghideError.h
BinaryOutputError::FILE_ERR
@ FILE_ERR
Definition: error.h:55
BinaryIO
provides methods for file i/o as needed by the rest of steghide
Definition: BinaryIO.h:33
BinaryInputError::FILE_ERR
@ FILE_ERR
Definition: error.h:40
BinaryInputError
Definition: error.h:38
NotImplementedError::NotImplementedError
NotImplementedError(const char *msgfmt,...)
Definition: error.cc:129
UnSupFileFormat
Definition: error.h:68
BinaryOutputError::type
TYPE type
Definition: error.h:65
BinaryOutputError::TYPE
TYPE
Definition: error.h:55
ArgError::printMessage
void printMessage(void) const
Definition: error.cc:42
BinaryOutputError::STDOUT_ERR
@ STDOUT_ERR
Definition: error.h:55
CorruptDataError
is thrown as exception when corrupt data is encountered during extraction
Definition: error.h:86
BinaryOutputError::setType
void setType(TYPE t)
Definition: error.cc:107
BinaryInputError::BinaryInputError
BinaryInputError(std::string fn, FILE *s)
Definition: error.cc:51
SteghideError
Definition: SteghideError.h:28
BinaryInputError::TYPE
TYPE
Definition: error.h:40
BinaryInputError::getType
TYPE getType(void)
Definition: error.cc:76
BinaryInputError::setType
void setType(TYPE t)
Definition: error.cc:81
NotImplementedError
Definition: error.h:73
BinaryInputError::type
TYPE type
Definition: error.h:50
UnSupFileFormat::UnSupFileFormat
UnSupFileFormat(BinaryIO *io)
Definition: error.cc:115
BinaryInputError::FILE_EOF
@ FILE_EOF
Definition: error.h:40
NotImplementedError::printMessage
void printMessage(void) const
Definition: error.cc:138
BinaryOutputError::getType
TYPE getType(void)
Definition: error.cc:102
CorruptDataError::CorruptDataError
CorruptDataError(const char *msgfmt,...)
Definition: error.cc:149
ArgError::ArgError
ArgError(const char *msgfmt,...)
Definition: error.cc:33
CorruptDataError::printMessage
void printMessage(void) const
Definition: error.cc:158
BinaryInputError::STDIN_ERR
@ STDIN_ERR
Definition: error.h:40
BinaryOutputError::BinaryOutputError
BinaryOutputError(std::string fn)
Definition: error.cc:89
BinaryOutputError
Definition: error.h:53
ArgError
Definition: error.h:31