Linux/MacOSX: correctly handle some internal exception classes that were missed by the WaitDialog class.

This commit is contained in:
Mounir IDRASSI 2015-04-05 12:00:48 +02:00
parent a5203dd006
commit c4d30b34ba

View File

@ -29,6 +29,10 @@ namespace VeraCrypt
void WaitDialog::ThrowException(Exception* ex)
{
#define VC_CONVERT_EXCEPTION(NAME) if (dynamic_cast<NAME*> (ex)) throw (NAME&) *ex;
VC_CONVERT_EXCEPTION (SystemException);
VC_CONVERT_EXCEPTION (CipherException);
VC_CONVERT_EXCEPTION (VolumeException);
VC_CONVERT_EXCEPTION (PasswordException);
VC_CONVERT_EXCEPTION (PasswordIncorrect);
VC_CONVERT_EXCEPTION (PasswordKeyfilesIncorrect);
VC_CONVERT_EXCEPTION (PasswordOrKeyboardLayoutIncorrect);