Commit Graph

18 Commits

Author SHA1 Message Date
Dmitry Vedenko 690772ccb0 Use ShowExceptionDialog when we want to show ErrorReportDialog 2021-06-08 08:08:26 -07:00
Paul Licameli c5ebc396eb Audacity.h has shrunk to nothing, now remove it! 2021-05-10 00:05:23 -05:00
Paul Licameli c478e12b48 Fix dangling else ambiguity, and make that warning a build-breaker...
... In this case, the ambiguity resolution was correct for the intent, but
we shouldn't rely on that.
2020-09-22 13:14:29 -04:00
James Crook caf4eadb97 Help button for many warning messages; Restored warning icon.
The error icon was gone because we are now using the ErrorDialog, which didn't have it.  So added back explicitly.  I decided to go with wxART_WARNING rather than wxART_ERROR because nearly all of these present as warnings.
2020-09-14 17:43:28 +01:00
James Crook f06b9a9c71 UnitaryProject-25 Disk Full Errors
The disk full error text is now shorter/clearer and has a Help button with it.
2020-09-10 12:58:22 +01:00
Paul Licameli 1119dde68a Doxygen commentary for AudacityException.h 2020-08-25 01:00:23 -04:00
Paul Licameli 4a56af43aa Bug2442 residual: Review AudacityException classes...
... Have copy constructors only (no moves); disallow all assignments
2020-06-05 13:48:53 -04:00
Paul Licameli dc39f22442 AudacityMessageBox takes TranslatableString message and caption 2019-12-20 21:32:50 -05:00
Paul Licameli 503ccabdd8 TranslatableString caption & message in MessageBoxException 2019-12-16 10:58:05 -05:00
Paul Licameli f86403378b Move AudacityMessageBox to its own files...
... breaking cycles among low-level files introduced by 273ba9f
2019-05-20 14:48:36 -04:00
Paul Licameli 2db49dc1f0 Use standard library style members of wxArrayString (and wxString) ...
... which will make it easier to change the types of those containers to
std::vectors of other string-like classes

for wxString,

IsEmpty => empty
Clear => clear
Alloc => reserve

for wxArrayString,

Count => size
GetCount => size
IsEmpty => empty
Add => push_back
Clear => clear
Empty => clear
Sort => std::sort (only with default comparator)
SetCount => resize
Last => back
Item => operator []
Alloc => reserve
2019-03-10 14:43:57 -04:00
Paul Licameli ac373502a9 Don't need AudacityException::Move, use std::exception_ptr 2018-05-10 00:56:37 -04:00
Paul Licameli ccb4bbac33 Translate "Message" as default title of message box...
... This required a sweeping change of all calls to wxMessageBox!  But it seems
safe to me, despite the great number of touched files.
2018-01-01 17:50:02 -05:00
James Crook a49f14ad02 doxygen. Class list completed for letter 'A'. 2017-11-09 18:32:29 +00:00
Paul Licameli e4b9b7b505 Avoid long repetitions of message boxes for opening corrupt project 2017-10-21 10:40:41 -04:00
Paul Licameli 8e2e4a53b8 Define SimpleMessageBoxException 2017-03-31 17:47:18 -04:00
Paul Licameli 7927fe065f Fix move constructors and assignments of AudacityException classes 2017-03-21 14:11:17 -04:00
Paul Licameli df077d171a Exception framework: define AudacityException and GuardedCall...
AudacityException is an abstract base class for exceptions generated by
Audacity.

GuardedCall wraps any function (usually a lambda) in an appropriate catch
block.

It can also accept a second function that defines a catch block action, which
can rethrow or return a value for the GuardedCall.

It can also accept a third function, that defines another, delayed action that
executes in the main thread at idle time if the second function intercepts an
AudacityException and completes without rethrow.

Defaults for the second function simply return void or false.  Default for the
third function invokes a virtual method of AudacityException, which for
subclass MessageBoxException, displays a message box.
2017-03-17 17:52:57 -04:00