No quit (or return) found

CachéQuality release 
1.3.0
Id 
OS0083
Rule type 
Severity 

Critical

Critical
SQALE characteristic 
  • Reliability
    • Data
Tags 
runtime-failure
Remediation function 
Constant/issue
Remediation cost 
20min

Method is defined with ReturnType value but has no QUIT or RETURN command.

Noncompliant Code Example

Following code will compile, but on runtime the foo method will fail with "COMMAND error" message.

ClassMethod foo() As %String
{
}

ClassMethod bar()
{
    #Dim str As %String = ..foo()  // Function must return a value
}