summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-04-26 11:53:40 +0200
committerCarl Hetherington <cth@carlh.net>2024-04-26 11:53:40 +0200
commit74e944d9ba137386efff089f9906e64d255836c9 (patch)
treee4b15b1d1164c069b6df036f4f4c0316c665a7e1 /src/tools
parent17ef19940f152ceeb2e1ad696dd5e7ac5917d8cd (diff)
Allow customisation of error report email address.
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/dcpomatic.cc23
-rw-r--r--src/tools/dcpomatic_combiner.cc14
-rw-r--r--src/tools/dcpomatic_disk.cc14
-rw-r--r--src/tools/dcpomatic_editor.cc14
-rw-r--r--src/tools/dcpomatic_kdm.cc18
-rw-r--r--src/tools/dcpomatic_player.cc14
-rw-r--r--src/tools/dcpomatic_playlist.cc20
-rw-r--r--src/tools/dcpomatic_verifier.cc17
8 files changed, 76 insertions, 58 deletions
diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc
index de4ddebc2..a1b2cf750 100644
--- a/src/tools/dcpomatic.cc
+++ b/src/tools/dcpomatic.cc
@@ -1865,31 +1865,34 @@ private:
error_dialog (
nullptr,
wxString::Format(
- _("An exception occurred: %s (%s)\n\n") + REPORT_PROBLEM,
- std_to_wx (e.what()),
- std_to_wx (e.file().string().c_str())
+ _("An exception occurred: %s (%s)\n\n%s"),
+ std_to_wx(e.what()),
+ std_to_wx(e.file().string().c_str()),
+ wx::report_problem()
)
);
} catch (boost::filesystem::filesystem_error& e) {
error_dialog (
nullptr,
wxString::Format(
- _("An exception occurred: %s (%s) (%s)\n\n") + REPORT_PROBLEM,
- std_to_wx (e.what()),
- std_to_wx (e.path1().string()),
- std_to_wx (e.path2().string())
+ _("An exception occurred: %s (%s) (%s)\n\n%s"),
+ std_to_wx(e.what()),
+ std_to_wx(e.path1().string()),
+ std_to_wx(e.path2().string()),
+ wx::report_problem()
)
);
} catch (exception& e) {
error_dialog (
nullptr,
wxString::Format(
- _("An exception occurred: %s.\n\n") + REPORT_PROBLEM,
- std_to_wx (e.what ())
+ _("An exception occurred: %s.\n\n%s"),
+ std_to_wx(e.what()),
+ wx::report_problem()
)
);
} catch (...) {
- error_dialog (0, _("An unknown exception occurred.") + " " + REPORT_PROBLEM);
+ error_dialog(nullptr, _("An unknown exception occurred.") + " " + wx::report_problem());
}
}
diff --git a/src/tools/dcpomatic_combiner.cc b/src/tools/dcpomatic_combiner.cc
index a28e063e5..26ca0022b 100644
--- a/src/tools/dcpomatic_combiner.cc
+++ b/src/tools/dcpomatic_combiner.cc
@@ -297,21 +297,23 @@ public:
error_dialog (
0,
wxString::Format(
- _("An exception occurred: %s (%s)\n\n") + REPORT_PROBLEM,
- std_to_wx (e.what()),
- std_to_wx (e.file().string().c_str ())
+ _("An exception occurred: %s (%s)\n\n%s"),
+ std_to_wx(e.what()),
+ std_to_wx(e.file().string().c_str()),
+ wx::report_problem()
)
);
} catch (exception& e) {
error_dialog (
0,
wxString::Format(
- _("An exception occurred: %s.\n\n") + REPORT_PROBLEM,
- std_to_wx (e.what ())
+ _("An exception occurred: %s\n\n%s"),
+ std_to_wx(e.what()),
+ wx::report_problem()
)
);
} catch (...) {
- error_dialog (nullptr, _("An unknown exception occurred.") + " " + REPORT_PROBLEM);
+ error_dialog(nullptr, _("An unknown exception occurred.") + " " + wx::report_problem());
}
}
diff --git a/src/tools/dcpomatic_disk.cc b/src/tools/dcpomatic_disk.cc
index cd07f935d..a20a062e3 100644
--- a/src/tools/dcpomatic_disk.cc
+++ b/src/tools/dcpomatic_disk.cc
@@ -569,21 +569,23 @@ public:
error_dialog (
0,
wxString::Format (
- _("An exception occurred: %s (%s)\n\n") + REPORT_PROBLEM,
- std_to_wx (e.what()),
- std_to_wx (e.file().string().c_str ())
+ _("An exception occurred: %s (%s)\n\n%s"),
+ std_to_wx(e.what()),
+ std_to_wx(e.file().string().c_str()),
+ wx::report_problem()
)
);
} catch (exception& e) {
error_dialog (
0,
wxString::Format (
- _("An exception occurred: %s.\n\n") + REPORT_PROBLEM,
- std_to_wx (e.what ())
+ _("An exception occurred: %s.\n\n%s"),
+ std_to_wx(e.what()),
+ wx::report_problem()
)
);
} catch (...) {
- error_dialog (0, _("An unknown exception occurred.") + " " + REPORT_PROBLEM);
+ error_dialog(nullptr, _("An unknown exception occurred.") + " " + wx::report_problem());
}
}
diff --git a/src/tools/dcpomatic_editor.cc b/src/tools/dcpomatic_editor.cc
index fc04ce017..47c7bac14 100644
--- a/src/tools/dcpomatic_editor.cc
+++ b/src/tools/dcpomatic_editor.cc
@@ -527,21 +527,23 @@ private:
error_dialog (
0,
wxString::Format (
- _("An exception occurred: %s (%s)\n\n") + REPORT_PROBLEM,
- std_to_wx (e.what()),
- std_to_wx (e.file().string().c_str ())
+ _("An exception occurred: %s (%s)\n\n%s"),
+ std_to_wx(e.what()),
+ std_to_wx(e.file().string().c_str()),
+ wx::report_problem()
)
);
} catch (exception& e) {
error_dialog (
0,
wxString::Format (
- _("An exception occurred: %s.\n\n") + REPORT_PROBLEM,
- std_to_wx (e.what ())
+ _("An exception occurred: %s\n\n%s"),
+ std_to_wx(e.what()),
+ wx::report_problem()
)
);
} catch (...) {
- error_dialog (0, _("An unknown exception occurred.") + " " + REPORT_PROBLEM);
+ error_dialog(nullptr, _("An unknown exception occurred.") + " " + wx::report_problem());
}
}
diff --git a/src/tools/dcpomatic_kdm.cc b/src/tools/dcpomatic_kdm.cc
index 7838e145d..b333f5327 100644
--- a/src/tools/dcpomatic_kdm.cc
+++ b/src/tools/dcpomatic_kdm.cc
@@ -920,23 +920,25 @@ private:
throw;
} catch (FileError& e) {
error_dialog (
- 0,
+ nullptr,
wxString::Format (
- _("An exception occurred: %s (%s)\n\n") + REPORT_PROBLEM,
- std_to_wx (e.what()),
- std_to_wx (e.file().string().c_str ())
+ _("An exception occurred: %s (%s)\n\n%s"),
+ std_to_wx(e.what()),
+ std_to_wx(e.file().string().c_str()),
+ wx::report_problem()
)
);
} catch (exception& e) {
error_dialog (
nullptr,
wxString::Format (
- _("An exception occurred: %s.\n\n") + " " + REPORT_PROBLEM,
- std_to_wx(e.what())
+ _("An exception occurred: %s.\n\n%s"),
+ std_to_wx(e.what()),
+ wx::report_problem()
)
);
} catch (...) {
- error_dialog (0, _("An unknown exception occurred.") + " " + REPORT_PROBLEM);
+ error_dialog(nullptr, _("An unknown exception occurred.") + " " + wx::report_problem());
}
/* This will terminate the program */
@@ -945,7 +947,7 @@ private:
void OnUnhandledException () override
{
- error_dialog (nullptr, _("An unknown exception occurred.") + " " + REPORT_PROBLEM);
+ error_dialog(nullptr, _("An unknown exception occurred.") + " " + wx::report_problem());
}
void idle ()
diff --git a/src/tools/dcpomatic_player.cc b/src/tools/dcpomatic_player.cc
index dec07d4a8..b877f10cd 100644
--- a/src/tools/dcpomatic_player.cc
+++ b/src/tools/dcpomatic_player.cc
@@ -1329,21 +1329,23 @@ private:
error_dialog (
0,
wxString::Format (
- _("An exception occurred: %s (%s)\n\n") + REPORT_PROBLEM,
- std_to_wx (e.what()),
- std_to_wx (e.file().string().c_str ())
+ _("An exception occurred: %s (%s)\n\n%s"),
+ std_to_wx(e.what()),
+ std_to_wx(e.file().string().c_str()),
+ wx::report_problem()
)
);
} catch (exception& e) {
error_dialog (
0,
wxString::Format (
- _("An exception occurred: %s.\n\n") + REPORT_PROBLEM,
- std_to_wx (e.what ())
+ _("An exception occurred: %s\n\n%s"),
+ std_to_wx(e.what()),
+ wx::report_problem()
)
);
} catch (...) {
- error_dialog (0, _("An unknown exception occurred.") + " " + REPORT_PROBLEM);
+ error_dialog(nullptr, _("An unknown exception occurred.") + " " + wx::report_problem());
}
}
diff --git a/src/tools/dcpomatic_playlist.cc b/src/tools/dcpomatic_playlist.cc
index 56cf07413..a50fab37d 100644
--- a/src/tools/dcpomatic_playlist.cc
+++ b/src/tools/dcpomatic_playlist.cc
@@ -697,21 +697,23 @@ private:
error_dialog (
0,
wxString::Format (
- _("An exception occurred: %s (%s)\n\n") + REPORT_PROBLEM,
- std_to_wx (e.what()),
- std_to_wx (e.file().string().c_str ())
+ _("An exception occurred: %s (%s)\n\n%s") + wx::report_problem(),
+ std_to_wx(e.what()),
+ std_to_wx(e.file().string().c_str()),
+ wx::report_problem()
)
);
} catch (exception& e) {
error_dialog (
- 0,
- wxString::Format (
- _("An exception occurred: %s.\n\n") + " " + REPORT_PROBLEM,
- std_to_wx (e.what ())
+ nullptr,
+ wxString::Format(
+ _("An exception occurred: %s\n\n%s"),
+ std_to_wx(e.what()),
+ wx::report_problem()
)
);
} catch (...) {
- error_dialog (0, _("An unknown exception occurred.") + " " + REPORT_PROBLEM);
+ error_dialog(nullptr, _("An unknown exception occurred.") + " " + wx::report_problem());
}
/* This will terminate the program */
@@ -720,7 +722,7 @@ private:
void OnUnhandledException () override
{
- error_dialog (0, _("An unknown exception occurred.") + " " + REPORT_PROBLEM);
+ error_dialog(nullptr, _("An unknown exception occurred.") + " " + wx::report_problem());
}
void idle ()
diff --git a/src/tools/dcpomatic_verifier.cc b/src/tools/dcpomatic_verifier.cc
index 273403a4e..834ebefa1 100644
--- a/src/tools/dcpomatic_verifier.cc
+++ b/src/tools/dcpomatic_verifier.cc
@@ -201,31 +201,34 @@ private:
error_dialog(
nullptr,
wxString::Format(
- _("An exception occurred: %s (%s)\n\n") + REPORT_PROBLEM,
+ _("An exception occurred: %s (%s)\n\n%s"),
std_to_wx(e.what()),
- std_to_wx(e.file().string().c_str())
+ std_to_wx(e.file().string().c_str()),
+ wx::report_problem()
)
);
} catch (boost::filesystem::filesystem_error& e) {
error_dialog(
nullptr,
wxString::Format(
- _("An exception occurred: %s (%s) (%s)\n\n") + REPORT_PROBLEM,
+ _("An exception occurred: %s (%s) (%s)\n\n%s"),
std_to_wx(e.what()),
std_to_wx(e.path1().string()),
- std_to_wx(e.path2().string())
+ std_to_wx(e.path2().string()),
+ wx::report_problem()
)
);
} catch (exception& e) {
error_dialog(
nullptr,
wxString::Format(
- _("An exception occurred: %s.\n\n") + REPORT_PROBLEM,
- std_to_wx(e.what())
+ _("An exception occurred: %s.\n\n%s"),
+ std_to_wx(e.what()),
+ wx::report_problem()
)
);
} catch (...) {
- error_dialog(nullptr, _("An unknown exception occurred.") + " " + REPORT_PROBLEM);
+ error_dialog(nullptr, _("An unknown exception occurred.") + " " + wx::report_problem());
}
}