@@ -69,11 +69,11 @@ class Message {
6969 buf . skipUB2 ( ) ; // array elem error
7070 buf . skipUB2 ( ) ; // array elem error
7171 this . errorInfo . cursorId = buf . readUB2 ( ) ; // cursor id
72- this . errorInfo . pos = buf . readUB2 ( ) ; // error position
72+ const errorPos = buf . readSB2 ( ) ; // error position
7373 buf . skipUB1 ( ) ; // sql type (19c and earlier)
7474 buf . skipUB1 ( ) ; // fatal ?
75- buf . skipUB2 ( ) ; // flags
76- buf . skipUB2 ( ) ; // user cursor options
75+ buf . skipUB1 ( ) ; // flags
76+ buf . skipUB1 ( ) ; // user cursor options
7777 buf . skipUB1 ( ) ; // UPI parameter
7878 buf . skipUB1 ( ) ; // warning flag
7979 this . errorInfo . rowID = buf . readRowID ( ) ; // rowid
@@ -138,8 +138,13 @@ class Message {
138138 buf . skipUB4 ( ) ; // sql type
139139 buf . skipUB4 ( ) ; // server checksum
140140 }
141+
142+ // error message
141143 if ( this . errorInfo . num !== 0 ) {
142144 this . errorOccurred = true ;
145+ if ( errorPos >= 0 ) {
146+ this . errorInfo . pos = errorPos ;
147+ }
143148 this . errorInfo . message = buf . readStr ( constants . CSFRM_IMPLICIT ) ;
144149 /*
145150 * Remove ending newline from ORA error message
@@ -154,7 +159,7 @@ class Message {
154159
155160 processWarningInfo ( buf ) {
156161 this . errorInfo . num = buf . readUB2 ( ) ; // error number
157- const numBytes = buf . readUB2 ( ) ; // length of error message
162+ const numBytes = buf . readUB2 ( ) ; // length of error message
158163 buf . skipUB2 ( ) ; // flags
159164 if ( this . errorInfo . num != 0 && numBytes > 0 ) {
160165 this . errorInfo . message = buf . readStr ( constants . CSFRM_IMPLICIT ) ;
0 commit comments