node-firebird-drivers icon indicating copy to clipboard operation
node-firebird-drivers copied to clipboard

Error message encoding lost

Open gsbelarus opened this issue 6 years ago • 11 comments

Error message encoding being lost some where during propagation from firebird client library to nodejs output:

image

gsbelarus avatar Feb 23 '19 15:02 gsbelarus

And, as it was discussed earlier, it would be great to get a firebird error code as well as a text error message.

gsbelarus avatar Feb 23 '19 15:02 gsbelarus

Isn't this your code not handing the promise rejection? If not, test case is needed.

asfernandes avatar Feb 23 '19 15:02 asfernandes

And, as it was discussed earlier, it would be great to get a firebird error code as well as a text error message.

That ticket is already created - #1

asfernandes avatar Feb 23 '19 15:02 asfernandes

Isn't this your code not handing the promise rejection?

Yes, it is our code

sywka avatar Feb 23 '19 15:02 sywka

This error is thrown by the driver when database is creating

sywka avatar Feb 23 '19 16:02 sywka

You mean that error catched has not that question marks, and error not catched and displayed by node has it?

asfernandes avatar Feb 23 '19 16:02 asfernandes

Seems like an issue with converting binary buffer with non-unicode characters to a string.

gsbelarus avatar Feb 23 '19 16:02 gsbelarus

Is this "????" a localized Windows message?

asfernandes avatar Feb 23 '19 16:02 asfernandes

To avoid misunderstandings. We get this error from driver method with try {...} catch (error) {console.error(error)} while creating database. We see it in the console:

Error: I/O error during "CreateFile (create)" operation for file "G:\WEB\JENKINS\WORKSPACE\GDMN-BACK\SRC\GDMN-BACK\DATABASES\MAIN.FDB"
-Error while trying to create file
-??????? ?? ??????? ????? ????????? ????.

The reason of error we can't understand, because we don't see error message. The error with question marks throws only on windows.

sywka avatar Feb 25 '19 12:02 sywka

What about open a cmd.exe console and run isql non-existing-file?

Will the same problem will happen?

asfernandes avatar Feb 25 '19 12:02 asfernandes

For connection to non-existing-file isql shows correct error message:

I/O error during "CreateFile (open)" operation for file "G:\WEB\TEST.FDB"
-Error while trying to open file
-The system cannot find the file specified.

sywka avatar Feb 25 '19 13:02 sywka