asfernandes / node-firebird-drivers

Node.js Firebird Drivers
MIT License
53 stars 17 forks source link

Error message encoding lost #17

Open gsbelarus opened 5 years ago

gsbelarus commented 5 years ago

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

image

gsbelarus commented 5 years ago

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

asfernandes commented 5 years ago

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

asfernandes commented 5 years ago

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

sywka commented 5 years ago

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

Yes, it is our code

sywka commented 5 years ago

This error is thrown by the driver when database is creating

asfernandes commented 5 years ago

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

gsbelarus commented 5 years ago

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

asfernandes commented 5 years ago

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

sywka commented 5 years ago

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.

asfernandes commented 5 years ago

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

Will the same problem will happen?

sywka commented 5 years ago

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.