Currently evaluating image libraries to switch to from my current usage of GDI+ (System.Drawing.dll).
Being used to having .NET libraries throw exceptions upon failure, I got really confused to see that SkiaSharp does _not_ follow this .NET pattern.
Methods that can fail seem to return false only, like e.g. SKBitmap.ScalePixels.
In addition I found no way to get extended error messages, once a function fails and returns false.
I would have expected to have at least something similar to Marshal.GetLastWin32Error but again found nothing.
I strongly feel that SkiaSharp is not usable in any medium sized project because of the minimal error reporting. On the other hand, given SkiaSharps popularity, I really do hope, I miss some essential points.
My questions:
There was some discussion in #1169 about changes, but this is going to be really, really hard:
With regards to the original question:
If not, can I query SkiaSharp to give me more error details than just a boolean?
Often there is no actual data coming from the native API, so this is hard. However, some APIs also have an overload that provides some "result" or "status" value.