///<summary> /// Retrieves last error from underlying turbo-jpeg library and throws exception</summary> /// <exception cref="TJException"> Throws if low level turbo jpeg function fails </exception> public static void GetErrorAndThrow() { var error = TurboJpegImport.tjGetErrorStr(); throw new TJException(error); }