Jump to content

  •  

Bug Tracker Migration

June 3rd
Good news everyone! The staff has decided that it is time to slowly kill off this Bug Tracker. We will begin the process of slowly migrating from this Bug Tracker over to our Github Issues which can be found here: https://github.com/HerculesWS/Hercules/issues

Over the next couple of days, I will be closing off any opportunity to create new reports. However, I still will keep the opportunity to reply to existing Bug Reports. Doing this will allow us to slowly fix any bug reports we have listed here so that we can easily migrate over to our Issue Tracker.

Update - June 7th 2015: Creating new bug posts has been disabled. Please use our https://github.com/HerculesWS/Hercules/issues tracker to post bugs. Users are still able to reply to existing bug posts.

- Administration

Issue Information

Issue Confirmations

  • Yes (0)No (0)
Photo

Error Codes To Error Messages

Posted by Hercules Bot on 25 September 2007 - 01:06 PM

Originally posted by theultramage
http://www.eathena.w...ker&showbug=117

Currently socket error messages look like this:

[Error]: bind failed (socket 5, code 98)!

This is very user-unfriendly, and even more so because these codes vary from system to system. Printing the error message would help users determine problems without digging through system headers or posting new topics in the forums.

For unix, there are the standard strerror(), and maybe strerror_r() functions. For Windows there's the winapi FormatMessage?() function (avoid strerror() since it doesn't handle socket codes).

A 'const char* errmsg(int code)' helper function should do the job. Problem is that the system will only provide messages into a prepared buffer, not directly as const*, therefore a static buffer will probably have to be used.

Originally posted by Gepard
Fixed in [rev=15518].