Southclaws / sampctl

The Swiss Army Knife of SA:MP - vital tools for any server owner or library maintainer.
GNU General Public License v3.0
241 stars 33 forks source link

Better error output #446

Closed Southclaws closed 2 years ago

Southclaws commented 2 years ago

On Windows, you can derive a lot more useful information from some errors: https://pkg.go.dev/golang.org/x/sys/windows#NTStatus

exit status 3221225781 is awkward to read, but:

exit status STATUS_DLL_NOT_FOUND (0xC0000135) is nicer, and maybe some common status codes could have additional help text, such as:

exit status STATUS_DLL_NOT_FOUND

This is not a problem with sampctl. This is commonly caused by a plugin that requires a dependency. More often than not, this dependency is one of the Microsoft Visual C++ Runtime Redistributable packages. Please check the plugin documentation or bug tracker/issues page for reports similar problems for a possible solution.

On Linux... no idea.

VIRUXE commented 2 years ago

I vote for this. I think everyone can agree that windows is the most predominant OS with dev environments.

ADRFranklin commented 2 years ago

A simple solution has been added for this now: https://github.com/Southclaws/sampctl/commit/c5748c84845eef280e3d8d5a98d915344d8edc06

In the future this will be put in to a sys package to go along with Linux version of the output. This will make it into the 2.0 release.