intersystems / intersystems/git-source-control

Exceptions opening Analytics Architect

Aperta
#980 2 commenti 0 reazioni 1 assegnatario Rivendicata da @isc-pbarton Vedi su GitHub
customer
Lingua principale
ObjectScript
Stelle
22
Fork
14
Merge medio
1g 9h
PR unite (30g)
5

Descrizione

So far, no one has created any analytics cubes yet in our system. When I opened the architect for the first time, I saw this exception:

Image

> Error invoking Source Control: ERROR #5002 ObjectScript error: IsProductionClass+1^SourceControl.Git.Production *(No name)

IsProductionClass() does not have any null input safety checks:

```ObjectScript
SHCDF>zw $system.CLS.IsMthd("", "%Extends")

ZW $SYSTEM.CLS.IsMthd("", "%Extends")
^
*(No name)
```

I would think this function should return 0-false if `className` is blank:

```ObjectScript
ClassMethod IsProductionClass(className As %String, nameMethod As %String) As %Boolean
{
quit:(className = "") 0
if $system.CLS.IsMthd(className, "%Extends") {
try {
return $classmethod(className, "%Extends", "Ens.Production")
} catch err {
if '(err.AsStatus() [ "CLASS DOES NOT EXIST") throw err
}
} else {
```

While I was reading the code where this gets called from, I also noticed that `Git.Utils.Type()` also has weird behavior when it's input is blank:
```ObjectScript
SHCDF>zw ##class(SourceControl.Git.Utils).Type("")
"csp"
```
It should probably return `""`, though I did not analyze the implication of this.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.