~ubuntu-branches/ubuntu/wily/mkvtoolnix/wily

« back to all changes in this revision

Viewing changes to src/merge/input_x.h

  • Committer: Package Import Robot
  • Author(s): Christian Marillat
  • Date: 2015-04-26 10:36:27 UTC
  • mfrom: (1.1.29) (4.2.45 sid)
  • Revision ID: package-import@ubuntu.com-20150426103627-k53p8hrai2ynikaa
Tags: 7.8.0-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
   mkvmerge -- utility for splicing together matroska files
 
3
   from component media subtypes
 
4
 
 
5
   Distributed under the GPL v2
 
6
   see the file COPYING for details
 
7
   or visit http://www.gnu.org/copyleft/gpl.html
 
8
 
 
9
   class definition input exceptions
 
10
 
 
11
   Written by Moritz Bunkus <moritz@bunkus.org>.
 
12
*/
 
13
 
 
14
#ifndef MTX_MERGE_INPUT_X_H
 
15
#define MTX_MERGE_INPUT_X_H
 
16
 
 
17
#include "common/common_pch.h"
 
18
 
 
19
namespace mtx {
 
20
  namespace input {
 
21
    class exception: public mtx::exception {
 
22
    public:
 
23
      virtual const char *what() const throw() {
 
24
        return "unspecified reader error";
 
25
      }
 
26
    };
 
27
 
 
28
    class open_x: public exception {
 
29
    public:
 
30
      virtual const char *what() const throw() {
 
31
        return "open error";
 
32
      }
 
33
    };
 
34
 
 
35
    class invalid_format_x: public exception {
 
36
    public:
 
37
      virtual const char *what() const throw() {
 
38
        return "invalid format";
 
39
      }
 
40
    };
 
41
 
 
42
    class header_parsing_x: public exception {
 
43
    public:
 
44
      virtual const char *what() const throw() {
 
45
        return "headers could not be parsed or were incomplete";
 
46
      }
 
47
    };
 
48
 
 
49
    class extended_x: public exception {
 
50
    protected:
 
51
      std::string m_message;
 
52
    public:
 
53
      extended_x(const std::string &message)  : m_message(message)       { }
 
54
      extended_x(const boost::format &message): m_message(message.str()) { }
 
55
      virtual ~extended_x() throw() { }
 
56
 
 
57
      virtual const char *what() const throw() {
 
58
        return m_message.c_str();
 
59
      }
 
60
    };
 
61
  }
 
62
}
 
63
 
 
64
#endif  // MTX_MERGE_INPUT_X_H