Mantid
Loading...
Searching...
No Matches
ErrorReporter.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2015 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 +
7#pragma once
8
9#include <Poco/ActiveMethod.h>
10#include <string>
11
13#include "MantidKernel/DllConfig.h"
15
16namespace Mantid {
17namespace Kernel {
18
22class MANTID_KERNEL_DLL ErrorReporter {
23public:
25 ErrorReporter(const std::string &application, const Types::Core::time_duration &startTime,
26 const std::string &exitCode, bool share);
28 ErrorReporter(const std::string &application, const Types::Core::time_duration &startTime,
29 const std::string &exitCode, bool share, const std::string &name, const std::string &email,
30 const std::string &textBox);
32 ErrorReporter(std::string application, Types::Core::time_duration startTime, std::string exitCode, bool share,
33 std::string name, std::string email, std::string textBox, std::string stacktrace);
35 Kernel::InternetHelper::HTTPStatus sendErrorReport();
37 virtual std::string generateErrorMessage() const;
38
39protected:
41 virtual Kernel::InternetHelper::HTTPStatus sendReport(const std::string &message, const std::string &url);
42
43private:
44 const std::string m_application;
45 const std::string m_exitCode;
46 const Types::Core::time_duration m_upTime;
47 const bool m_share;
48 const std::string m_name;
49 const std::string m_email;
50 const std::string m_textbox;
51 std::string m_url;
52 const std::string m_stacktrace;
53};
54
55} // namespace Kernel
56} // namespace Mantid
ErrorReporter : The error reporter is responsible for sending error reports.
Definition: ErrorReporter.h:22
const std::string m_application
Definition: ErrorReporter.h:44
const std::string m_exitCode
Definition: ErrorReporter.h:45
const std::string m_textbox
Definition: ErrorReporter.h:50
const Types::Core::time_duration m_upTime
Definition: ErrorReporter.h:46
const std::string m_stacktrace
Definition: ErrorReporter.h:52
Helper class which provides the Collimation Length for SANS instruments.