TJBench: Recover from non-fatal errors if possible

Previously, -stoponwarning only had an effect on the underlying
TurboJPEG C functions, but TJBench still aborted if a non-fatal error
occurred.  This commit modifies the C version of TJBench such that it
always recovers from a non-fatal error unless -stoponwarning is
specified.  Furthermore, the benchmark stores the details of the last
non-fatal error and does not print any subsequent non-fatal error
messages unless they differ from the last one.

Due to limitations in the Java API (specifically, the fact that it
cannot communicate errors, fatal or otherwise, to the calling program
without throwing a TJException), it was only possible to make
decompression operations fully recoverable within TJBench.  With other
operations, -stoponwarning still has an effect on the underlying C
library but has no effect at the Java level.

The Java API documentation has been amended to reflect that only certain
methods are truly recoverable, regardless of the state of
TJ.FLAG_STOPONWARNING.
6 files changed
tree: aaa572c147b3f46cddea30070de6db013ab3fcff
  1. ci/
  2. cmakescripts/
  3. doc/
  4. java/
  5. md5/
  6. release/
  7. sharedlib/
  8. simd/
  9. testimages/
  10. win/
  11. .gitattributes
  12. .travis.yml
  13. appveyor.yml
  14. bmp.c
  15. bmp.h
  16. BUILDING.md
  17. cderror.h
  18. cdjpeg.c
  19. cdjpeg.h
  20. change.log
  21. ChangeLog.md
  22. cjpeg.1
  23. cjpeg.c
  24. CMakeLists.txt
  25. coderules.txt
  26. djpeg.1
  27. djpeg.c
  28. doxygen-extra.css
  29. doxygen.config
  30. example.c
  31. jaricom.c
  32. jcapimin.c
  33. jcapistd.c
  34. jcarith.c
  35. jccoefct.c
  36. jccolext.c
  37. jccolor.c
  38. jcdctmgr.c
  39. jchuff.c
  40. jchuff.h
  41. jcicc.c
  42. jcinit.c
  43. jcmainct.c
  44. jcmarker.c
  45. jcmaster.c
  46. jcomapi.c
  47. jconfig.h.in
  48. jconfig.txt
  49. jconfigint.h.in
  50. jcparam.c
  51. jcphuff.c
  52. jcprepct.c
  53. jcsample.c
  54. jcstest.c
  55. jctrans.c
  56. jdapimin.c
  57. jdapistd.c
  58. jdarith.c
  59. jdatadst-tj.c
  60. jdatadst.c
  61. jdatasrc-tj.c
  62. jdatasrc.c
  63. jdcoefct.c
  64. jdcoefct.h
  65. jdcol565.c
  66. jdcolext.c
  67. jdcolor.c
  68. jdct.h
  69. jddctmgr.c
  70. jdhuff.c
  71. jdhuff.h
  72. jdicc.c
  73. jdinput.c
  74. jdmainct.c
  75. jdmainct.h
  76. jdmarker.c
  77. jdmaster.c
  78. jdmaster.h
  79. jdmerge.c
  80. jdmrg565.c
  81. jdmrgext.c
  82. jdphuff.c
  83. jdpostct.c
  84. jdsample.c
  85. jdsample.h
  86. jdtrans.c
  87. jerror.c
  88. jerror.h
  89. jfdctflt.c
  90. jfdctfst.c
  91. jfdctint.c
  92. jidctflt.c
  93. jidctfst.c
  94. jidctint.c
  95. jidctred.c
  96. jinclude.h
  97. jmemmgr.c
  98. jmemnobs.c
  99. jmemsys.h
  100. jmorecfg.h
  101. jpeg_nbits_table.h
  102. jpegcomp.h
  103. jpegint.h
  104. jpeglib.h
  105. jpegtran.1
  106. jpegtran.c
  107. jquant1.c
  108. jquant2.c
  109. jsimd.h
  110. jsimd_none.c
  111. jsimddct.h
  112. jstdhuff.c
  113. jutils.c
  114. jversion.h
  115. libjpeg.map.in
  116. libjpeg.txt
  117. LICENSE.md
  118. rdbmp.c
  119. rdcolmap.c
  120. rdgif.c
  121. rdjpgcom.1
  122. rdjpgcom.c
  123. rdppm.c
  124. rdrle.c
  125. rdswitch.c
  126. rdtarga.c
  127. README.ijg
  128. README.md
  129. structure.txt
  130. tjbench.c
  131. tjbenchtest.in
  132. tjbenchtest.java.in
  133. tjexampletest.in
  134. tjunittest.c
  135. tjutil.c
  136. tjutil.h
  137. transupp.c
  138. transupp.h
  139. turbojpeg-jni.c
  140. turbojpeg-mapfile
  141. turbojpeg-mapfile.jni
  142. turbojpeg.c
  143. turbojpeg.h
  144. usage.txt
  145. wizard.txt
  146. wrbmp.c
  147. wrgif.c
  148. wrjpgcom.1
  149. wrjpgcom.c
  150. wrppm.c
  151. wrppm.h
  152. wrrle.c
  153. wrtarga.c