As I see in your code you already do some "error handling". So you can continue:

Change your code

Do objExternalUser.%Save()

to the following:

set stat=objExternalUser.%Save()

if $$$ISERR(stat) {

 #; error handling

 d $System.OBJ.DisplayError(stat)

}

HTH.

Out of curiosity - you have empty Try-Catch block. Why don't use it?

you could embrace your code into the following:

$$$TOE(objExternalUser.%Save())

And catch your error with status in catch then.

Hi Salma!

If you import this file from this Open Exchange project it can do the export classes in folders:

Once imported call this to setup a folder:

USER>do ##class(dev.code).workdir("my/workdir/src")

Call this to export all classes, macro, deepsee resources in a given workdir.

USER> do ##class(dev.code).export()

You also can import the whole package too.

HTH

Says 

#1038: Private variable not allowed : 'gniter=$na(from)' : Offset:21 [zInvertList+1^Example.Globals.1]

for

ClassMethod InvertList(from, to) As %Status

{

#define ForAll(%in,%gn) s gn%in=$na(%gn) s %in="" f { s %in=$o(@gn%in@(%in)) q:%in=""

#define EndFor }



$$$ForAll(iter,from)

set value=@from@(iter)

set @to@(value)=iter

$$$EndFor

}