User bio
404 bio not found
Member since Sep 9, 2020
Replies:

The solution I found is to create a new static method that creates an instance and returns it : 

Class Foo Extends %Exception.AbstractException
{
    ClassMethod Create(arg1 As %String, arg2 As %String, arg3 As %String, arg4 As %String, arg5 As %String) As %Status
    {
        quit ..%New("some message")
    }
}

Before :

throw ##class(Foo).%New("args1", "args2", "args3", ...)

After : 

throw ##class(Foo).Create("args1", "args2", "args3", ...)

Classes (which are high level) are converted to INT modules. INT and MAC files are compiled into OBJ. This is binary data (similar to Java bytecode) that will be interpreted using some kind of virtual machine/interpreter. A "+" sign appears in Studio when the modified date of a MAC or INT module is different than the related OBJ.

You can take a look at ^rMAC, ^rOBJ and ^ROUTINE globals for more details.

Thanks. I tried it and it works great most the time. However, I got a few cases where the IsUpToDate() returns 0 while the class does not show any "+" sign in Studio. I tried different values for "type" parameter but it does not help.

The error reported is as such : 
ERROR: ^oddCOM(cls,timechanged) does not exist

I checked and indeed there is no TimeChanged or TimeCreated in the class compiled global. Seems Studio is happy with that.

Certifications & Credly badges:
Norman has no Certifications & Credly badges yet.
Global Masters badges:
Norman has no Global Masters badges yet.
Followers:
Norman has no followers yet.
Following:
Norman has not followed anybody yet.