danielkrupinski / Osiris

Cross-platform game hack for Counter-Strike 2 with Panorama-based GUI.
MIT License
3.3k stars 960 forks source link

Don't mark every method as "noexcept"... #350

Closed 48cf closed 5 years ago

48cf commented 5 years ago

No, it doesn't mean your cheat will never throw an exception LULW.

noexcept - cppreference.com noexcept specifier - cppreference.com

https://github.com/danielkrupinski/Osiris/blob/master/Osiris/Hacks/SkinChanger.cpp#L29

Here, you don't even check if the V_UCS2ToUTF8 is a valid pointer, therefore it may throw already...

I could find couple more examples, but that just seems pointless, everything that you are doing is not always 100% safe, and therefore might throw an exception.

danielkrupinski commented 5 years ago

It means the function is not supposed to throw C++ exceptions. Derefencing null pointer will throw SEH/VEH exception not C++ one.