Mantid
|
The ScriptRepository class is intended to be used mainly by the users, who will be willing to share and download scripts for their analysis. More...
#include <ScriptRepository.h>
Public Member Functions | |
const std::string & | filePath () const |
Returns the file and position where the error was caused. More... | |
ScriptRepoException (const std::string &info, const std::string &system, const std::string &file=std::string(), int line=-1) | |
ScriptRepoException (const std::string &info=std::string("Unknown Exception")) | |
default constructor More... | |
const std::string & | systemError () const |
Returns the error description with technical details on the origin and cause. More... | |
const char * | what () const noexcept override |
Returns the message string. More... | |
Private Attributes | |
std::string | m_filepath |
std::string | m_systemError |
The message returned by what() More... | |
std::string | m_userInfo |
The ScriptRepository class is intended to be used mainly by the users, who will be willing to share and download scripts for their analysis.
As so, the exceptions that may occurr while operating must provide information that are usefull for them to understand what is happening, but, the Mantid Team must still be informed what happened in more techinical detail in order to be able to deal with eventually bugs.
To provide this functionality, the ScriptRepoException will be used. As a normal std::exception (the default base one used through all the Mantid Project), it allows Mantid to work as normally.
But, it extends the usage of the exception, by allowing more information to be added. Below, some examples on how to trigger exceptions.
The default ScriptRepoException::what method will be used to show the user message, while it is up to whom is using the ScriptRepository to decide on using or not the techinical information through ScriptRepoException::systemError, ScriptRepoException::filePath.
Definition at line 97 of file ScriptRepository.h.
|
inline |
default constructor
Definition at line 101 of file ScriptRepository.h.
Mantid::API::ScriptRepoException::ScriptRepoException | ( | const std::string & | info, |
const std::string & | system, | ||
const std::string & | file = std::string() , |
||
int | line = -1 |
||
) |
Definition at line 11 of file ScriptRepository.cpp.
References m_filepath, and std::to_string().
|
inline |
Returns the file and position where the error was caused.
Definition at line 114 of file ScriptRepository.h.
|
inline |
Returns the error description with technical details on the origin and cause.
Definition at line 112 of file ScriptRepository.h.
Referenced by MantidQt::API::RepoModel::handleExceptions().
|
overridenoexcept |
Returns the message string.
Definition at line 25 of file ScriptRepository.cpp.
References m_userInfo.
Referenced by delete_thread(), download_thread(), MantidQt::API::RepoModel::handleExceptions(), and upload_thread().
|
private |
Definition at line 120 of file ScriptRepository.h.
Referenced by ScriptRepoException().
|
private |
The message returned by what()
Definition at line 118 of file ScriptRepository.h.
|
private |
Definition at line 119 of file ScriptRepository.h.
Referenced by what().