Parasoft violation EXCEPT.NCSAE-3 on return line

103 views Asked by At

Throughout my codebase, I have a lot of parasoft violations

EXCEPT.NCSAE-3
Do not "catch" 'Exception', 'SystemException' or 'ApplicationException'.

occurring on the return line of functions. Any idea why that might be? Should they just be suppressed? Am I not handling something?

Example:

private async Task<int?> GetClientIdAsync(long? userId) {
    List<Client> _clients = await _clientService.GetClientsByUserId(userId.Value);

    if (_clients.Count == 1) { return _clients[0].ClientId; }

    return null;  // This is where the parasoft violation is occurring
}
1

There are 1 answers

0
szmyru - Irek Sz. On BEST ANSWER

JED, you have to upgrade your Parasoft dotTEST version.Described behavior has been fixed in v10 of dotTEST.