btzy / nativefiledialog-extended

Cross platform (Windows, Mac, Linux) native file dialog library with C and C++ bindings, based on mlabbe/nativefiledialog.
zlib License
598 stars 89 forks source link

Portal: Support formatted error messages using sprintf() #97

Closed btzy closed 1 year ago

btzy commented 1 year ago

It is not always possible to provide a good error message with a hardcoded string, because additional runtime information might be useful. This PR adds NFDi_SetFormattedError(), that can be used in place of NFDi_SetError() and calls vsprintf() internally.