FlightGear next
sentryIntegration.hxx
Go to the documentation of this file.
1// sentryIntegration.hxx - Interface with Sentry.io crash reporting
2//
3// Copyright (C) 2020 James Turner james@flightgear.org
4//
5// This program is free software; you can redistribute it and/or
6// modify it under the terms of the GNU General Public License as
7// published by the Free Software Foundation; either version 2 of the
8// License, or (at your option) any later version.
9//
10// This program is distributed in the hope that it will be useful, but
11// WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13// General Public License for more details.
14//
15// You should have received a copy of the GNU General Public License
16// along with this program; if not, write to the Free Software
17// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18
19#pragma once
20
21#include <string>
22#include <simgear/misc/strutils.hxx>
23
24namespace flightgear
25{
26void initSentry();
27
28void shutdownSentry();
29
31
32bool isSentryEnabled();
33
39std::string sentryUserId();
40
41void addSentryBreadcrumb(const std::string& msg, const std::string& level);
42
43void addSentryTag(const char* tag, const char* value);
44
45void addSentryTag(const std::string& tag, const std::string& value);
46
47void updateSentryTag(const std::string& tag, const std::string& value);
48
49
50void sentryReportNasalError(const std::string& msg, const string_list& stack);
51
52void sentryReportException(const std::string& msg, const std::string& location = {});
53
54void sentryReportFatalError(const std::string& msg, const std::string& more = {});
55
56void sentryReportUserError(const std::string& aggregate, const std::string& parameter, const std::string& details);
57
58
59} // of namespace flightgear
60
std::vector< std::string > string_list
Definition globals.hxx:36
FlightPlan.hxx - defines a full flight-plan object, including departure, cruise, arrival information ...
Definition Addon.cxx:53
void sentryReportUserError(const std::string &, const std::string &, const std::string &)
void updateSentryTag(const std::string &, const std::string &)
void addSentryBreadcrumb(const std::string &, const std::string &)
std::string sentryUserId()
retrive the anonymous user ID (a UUID) for this installation.
void addSentryTag(const char *, const char *)
void sentryReportException(const std::string &, const std::string &)
void sentryReportNasalError(const std::string &, const string_list &)
void sentryReportFatalError(const std::string &, const std::string &)