-
Notifications
You must be signed in to change notification settings - Fork 1
Improve handling of SQL warnings #126
Copy link
Copy link
Open
Description
Use SQA.GetWarning to get the actual content of warnings and print to session.
∇ msg←Catch msg;en;w
en←⊃msg
:If 0<en ⍝ Server error if database operation fails
{}SQA.Close cur
:If 2006=2 2⊃msg ⍝ SQL server has gone away
Debug'> SQL SERVER WAS AWAY FOR QUERY: ',⍕⎕TS
SQA.Close db
Connect ##.GetEnv¨'SQL_DATABASE' 'SQL_PASSWORD' 'SQL_USER'
:Else
(3⊃msg)⎕SIGNAL 500
:EndIf
:ElseIf 0>en
⎕←msg←2 1⊃SQA.GetWarning cur ⍝ Print and pass on warning
:EndIf
∇Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels