Send M errors back instead of disconnecting clients

Bug #363162 reported by Jon Tai
2
Affects Status Importance Assigned to Milestone
OpenVista/GT.M Integration
Fix Released
Medium
Unassigned

Bug Description

This issue was logged in our internal bug tracker back in 2007 as artf3951. We applied a hotfix for the issue, which has since been essentially forgotten. The fix never made it into an official KIDS build, as far as I know. We need to review the fix to see if it's still applicable and include it in our build.

Here's the original bug report:

"When running VistA in GT.M, the error trap handling seems to simply disconnect clients, instead of sending M errors back across the network when they happen. This isn't as nice for clients/users, and makes it harder to do initial debugging on what's going on."

Here's the fix:

"I have the fixed the error in GT.M where if Vista encounter an error it would drop the client. The problem was in the routine %ZTER, the main Vista error trap handler.

Below is a section of code that illustrates the problem and fix:

;Get $ZB
 I ^%ZOSF("OS")["DSM"!(^%ZOSF("OS")["GT.M") D
 . Q:'$L($ZB) ; rhl/medsphere 20070518
 . F %ZTER11I=1:1:$L($ZB) S %ZTER11A=$E($ZB,%ZTER11I),%ZTER11B=$G(%ZTER11B)_$S(%ZTER11A?1C:$A(%ZTER11A),1:%ZTER11A)_","
 . S %ZTER11B=$E(%ZTER11B,1,$L(%ZTER11B)-1)
 . Q
 S:'$D(%ZTER11B) %ZTER11B=$ZB

the line I added is in blue above; it tests that $ZB has a length greater than 0. the problem was that when is $ZB="" then the for loop is not iterated, and therefore %ZTER11B is not defined. in the next line, S %ZTER11B=$E(%ZTER11B,1,$L(%ZTER11B)-1), $ZTER11B is referenced, but since it is not defined a new error is generated and the processed is halted.

I did a unit test with the new code, and a error message properly pops-up in the client."

Jon Tai (jontai)
Changed in openvista-gtm-integration:
importance: Undecided → Medium
milestone: none → phase-1
status: New → Fix Committed
Jon Tai (jontai)
Changed in openvista-gtm-integration:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.