0

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
}
JED
  • 1,538
  • 2
  • 19
  • 47

1 Answers1

1

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