mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 02:58:02 -06:00
Linux/MaxOSX: correctly detect type of internal exceptions
This commit is contained in:
@@ -29,10 +29,6 @@ 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);
|
||||
@@ -96,6 +92,10 @@ namespace VeraCrypt
|
||||
VC_CONVERT_EXCEPTION (SecurityTokenKeyfileNotFound);
|
||||
VC_CONVERT_EXCEPTION (UnsupportedAlgoInTrueCryptMode);
|
||||
VC_CONVERT_EXCEPTION (UnsupportedTrueCryptFormat);
|
||||
VC_CONVERT_EXCEPTION (SystemException);
|
||||
VC_CONVERT_EXCEPTION (CipherException);
|
||||
VC_CONVERT_EXCEPTION (VolumeException);
|
||||
VC_CONVERT_EXCEPTION (PasswordException);
|
||||
throw *ex;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1588,9 +1588,12 @@ namespace VeraCrypt
|
||||
VC_CONVERT_EXCEPTION (SecurityTokenLibraryNotInitialized);
|
||||
VC_CONVERT_EXCEPTION (SecurityTokenKeyfileAlreadyExists);
|
||||
VC_CONVERT_EXCEPTION (SecurityTokenKeyfileNotFound);
|
||||
VC_CONVERT_EXCEPTION (SystemException);
|
||||
VC_CONVERT_EXCEPTION (UnsupportedAlgoInTrueCryptMode);
|
||||
VC_CONVERT_EXCEPTION (UnsupportedTrueCryptFormat);
|
||||
VC_CONVERT_EXCEPTION (SystemException);
|
||||
VC_CONVERT_EXCEPTION (CipherException);
|
||||
VC_CONVERT_EXCEPTION (VolumeException);
|
||||
VC_CONVERT_EXCEPTION (PasswordException);
|
||||
throw *ex;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user