Test result of %Save

objectscriptQuality release 
3.1.1
Id 
OS0099
Rule type 
Code Smell
Severity 

Major

Major
SQALE characteristic 
  • Reliability
    • Exception handling
Tags 
bug, runtime-failure
Remediation function 
Constant/issue
Remediation cost 
15m

The result of %Save() method should always be checked after it's called.

Compliant code

class c1
{
method m()
{
  set sc=instance.%Save()
  if ($$$ISERR(c)) {
    // TODO: Manage error
  }
}
}