ViennaSHE 1.3.0
Free open-source semiconductor device simulator using spherical harmonics expansions techniques.
exception.hpp
Go to the documentation of this file.
1#ifndef VIENNASHE_IO_EXCEPTION_HPP_
2#define VIENNASHE_IO_EXCEPTION_HPP_
3
4/* ============================================================================
5 Copyright (c) 2011-2022, Institute for Microelectronics,
6 Institute for Analysis and Scientific Computing,
7 TU Wien.
8
9 -----------------
10 ViennaSHE - The Vienna Spherical Harmonics Expansion Boltzmann Solver
11 -----------------
12
13 http://viennashe.sourceforge.net/
14
15 License: MIT (X11), see file LICENSE in the base directory
16=============================================================================== */
17
18
19#include <string>
20#include <iostream>
21#include <fstream>
22#include <stdexcept>
23
28namespace viennashe
29{
31 namespace io
32 {
33
34 //
35 // File IO-specific
36 //
38 class cannot_open_file_exception : public std::runtime_error {
39 public:
40 cannot_open_file_exception(std::string const & str) : std::runtime_error(str) {}
41 };
42
44 class premature_end_of_file_exception : public std::runtime_error {
45 public:
46 premature_end_of_file_exception(std::string const & str) : std::runtime_error(str) {}
47 };
48
50 class invalid_dimension_exception : public std::runtime_error {
51 public:
52 invalid_dimension_exception(std::string const & str) : std::runtime_error(str) {}
53 };
54
56 class io_operation_unsupported_exception : public std::runtime_error {
57 public:
58 io_operation_unsupported_exception(std::string const & str) : std::runtime_error(str) {}
59 };
60
62 class file_attribute_not_found_exception : public std::runtime_error {
63 public:
64 file_attribute_not_found_exception(std::string const & str) : std::runtime_error(str) {}
65 };
66
68 class file_segment_not_found_exception : public std::runtime_error {
69 public:
70 file_segment_not_found_exception(std::string const & str) : std::runtime_error(str) {}
71 };
72
73 } //namespace io
74}//namespace viennashe
75
76
77
78#endif
Exception which is thrown if a file cannot be opened.
Definition: exception.hpp:38
cannot_open_file_exception(std::string const &str)
Definition: exception.hpp:40
Exception which is thrown whenever a requested attribute was not found in a file.
Definition: exception.hpp:62
file_attribute_not_found_exception(std::string const &str)
Definition: exception.hpp:64
Exception which is thrown whenever a requested segment was not found in a file.
Definition: exception.hpp:68
file_segment_not_found_exception(std::string const &str)
Definition: exception.hpp:70
Exception which is thrown if a dimension different from the current dimension of viennagrid is found ...
Definition: exception.hpp:50
invalid_dimension_exception(std::string const &str)
Definition: exception.hpp:52
Exception which is thrown whenever a requested IO feature is currently not supported.
Definition: exception.hpp:56
io_operation_unsupported_exception(std::string const &str)
Definition: exception.hpp:58
Exception which is thrown if a End-of-File is encountered even though further data is expected.
Definition: exception.hpp:44
premature_end_of_file_exception(std::string const &str)
Definition: exception.hpp:46
The main ViennaSHE namespace. All functionality resides inside this namespace.
Definition: accessors.hpp:40