Mantid
Loading...
Searching...
No Matches
ScriptRepository.cpp
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
8
9namespace Mantid::API {
10
11ScriptRepoException::ScriptRepoException(const std::string &info, const std::string &system, const std::string &file,
12 int line)
13 : m_systemError(system), m_userInfo(info) {
14
15 if (file.empty()) {
16 m_filepath = "Not provided";
17 } else {
18 m_filepath = file;
19 if (line > 0) {
20 m_filepath.append(": ").append(std::to_string(line));
21 }
22 }
23}
24
25const char *ScriptRepoException::what() const noexcept { return m_userInfo.c_str(); }
26
27} // namespace Mantid::API
const char * what() const noexcept override
Returns the message string.
ScriptRepoException(const std::string &info=std::string("Unknown Exception"))
default constructor
std::string to_string(const wide_integer< Bits, Signed > &n)