Mantid
Loading...
Searching...
No Matches
NexusException.h
Go to the documentation of this file.
1#pragma once
2
3#include "MantidNexus/DllConfig.h"
5#include <iosfwd>
6#include <stdexcept>
7#include <string>
8
14namespace Mantid::Nexus {
15
21class MANTID_NEXUS_DLL Exception : public std::runtime_error {
22public:
24 Exception(const std::string &msg = "GENERIC ERROR", const std::string &functionname = "",
25 const std::string &filename = "");
27 const std::string functionname() const throw();
29 const std::string filename() const throw();
30
31private:
32 std::string m_functionname;
33 std::string m_filename;
34};
35
36MANTID_NEXUS_DLL std::ostream &operator<<(std::ostream &os, const Exception &err);
37}; // namespace Mantid::Nexus
Class that provides for a standard Nexus exception.
std::string m_functionname
Function this exception is associted with.
std::string m_filename
File this exception is associated with.
MANTID_API_DLL std::ostream & operator<<(std::ostream &, const AlgorithmHistory &)
Prints a text representation.
Header for a base Nexus::Exception.