View Revisions: Issue #3346

Summary 0003346: LicenseValidator's ReadProductProperties method catches all exceptions
Revision 2019-06-15 10:43 by WA9PIE
Description
    catch (...)
    {
        //errorMessage = ex.Message;
    }


It's an anti-pattern to catch all exceptions in most cases. Here, for sure -- no cleanup is performed, and the one chance at error reporting is commented-out (because it wouldn't work -- no such variables here). This code may pass a NULL pointer to OutputDebugString(), and the catch(...) code will make detecting and debugging that occurrence difficult.
Revision 2019-06-11 08:35 by K7ZCZ
Description
    catch (...)
    {
        //errorMessage = ex.Message;
    }


It's an anti-pattern to catch all exceptions in most cases. Here, for sure -- no cleanup is performed, and the one chance at error reporting is commented-out (because it wouldn't work -- no such variables here). This code may pass a NULL pointer to OutputDebugString(), and the catch(...) code will make detecting and debugging that occurrence difficult.