Skip to content

Commit 4c73288

Browse files
committed
Merge pull request #59 from intersystems-ru/minor-fix-no-try-catch
Removed try/catch. Use reflection instead to determine existence of s…
2 parents 46789b6 + 6c4bd27 commit 4c73288

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

export/WebTerminal/Autocomplete.xml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,11 @@ system classes generates one time and forever.
8686
set countMethods = cdefs.Methods.Count()
8787
set countParameters = cdefs.Parameters.Count()
8888
set countProperties = cdefs.Properties.Count()
89-
try { // SystemMethods does not exists for Caché versions before 2016.*
90-
set countSysMethods = ccdefs.SystemMethods.Count()
91-
} catch (e) {
92-
set countSysMethods = 0
89+
if ##class(%Dictionary.PropertyDefinition).IDKEYExists("%Dictionary.ClassDefinition","SystemMethods") {
90+
set countSysMethods = ccdefs.SystemMethods.Count()
91+
} else {
92+
// SystemMethods does not exist for Caché versions before 2016.*
93+
set countSysMethods = 0
9394
}
9495
set total = countMethods + countParameters + countProperties + countSysMethods
9596
set current = 0

0 commit comments

Comments
 (0)