LibPkg
exception.h
Go to the documentation of this file.
1 // This file is part of the RISC OS Toolkit (RTK).
2 // Copyright © 2003-2005 Graham Shaw.
3 // Distribution and use are subject to the GNU Lesser General Public License,
4 // a copy of which may be found in the file !RTK.Copyright.
5 //
6 // Cut down version to use with LibPkg created by Alan Buckley
7 // to remove the RTK dependency.
8 // Modified from RTK exception to add extra information
9 // by Theo Markettos
10 
11 #ifndef _LIBPKG_OS_EXCEPTION
12 #define _LIBPKG_OS_EXCEPTION
13 
14 #include <exception>
15 #include "kernel.h"
16 
17 namespace pkg {
18 namespace os {
19 
22 class exception:
23  public std::exception
24 {
25 private:
27  _kernel_oserror _err;
28 public:
36  exception(_kernel_oserror* err);
37  exception(_kernel_oserror* err, unsigned int number, unsigned int r0);
38 
41  virtual ~exception() throw() {}
42 
49  virtual const char* what() const throw();
50 };
51 
52 } /* namespace os */
53 } /* namespace pkg */
54 
55 #endif
An exception class to represent a RISC OS error block.
Definition: exception.h:22
The namespace used to hold the package management library.
Definition: auto_dir.cc:12
virtual const char * what() const
Get message.
Definition: exception.cc:36
exception(_kernel_oserror *err)
Construct exception from RISC OS error block.
Definition: exception.cc:21
virtual ~exception()
Destroy exception.
Definition: exception.h:41

Reference Manual LibPkg Version 0.6.1 (28 Jan 2015)