@@ -64,7 +64,6 @@ public interface FramePredicate {
6464
6565 /** The first three bytes of a well formed ID3 tag header. */
6666 public static final int ID3_TAG = 0x00494433 ;
67-
6867 /** Length of an ID3 tag header. */
6968 public static final int ID3_HEADER_LENGTH = 10 ;
7069
@@ -372,8 +371,8 @@ private static Id3Frame decodeFrame(
372371 frameSize = removeUnsynchronization (id3Data , frameSize );
373372 }
374373
375- String error = "" ;
376374 Id3Frame frame = null ;
375+ Throwable error = null ;
377376 try {
378377 if (frameId0 == 'T'
379378 && frameId1 == 'X'
@@ -431,10 +430,8 @@ private static Id3Frame decodeFrame(
431430 String id = getFrameId (majorVersion , frameId0 , frameId1 , frameId2 , frameId3 );
432431 frame = decodeBinaryFrame (id3Data , frameSize , id );
433432 }
434- } catch (Exception e ) {
435- error = ",error=" + e .getMessage ();
436- } catch (OutOfMemoryError e ) {
437- error = ",error=" + e .getMessage ();
433+ } catch (OutOfMemoryError | Exception e ) {
434+ error = e ;
438435 } finally {
439436 id3Data .setPosition (nextFramePosition );
440437 }
@@ -444,8 +441,8 @@ private static Id3Frame decodeFrame(
444441 "Failed to decode frame: id="
445442 + getFrameId (majorVersion , frameId0 , frameId1 , frameId2 , frameId3 )
446443 + ", frameSize="
447- + frameSize
448- + error );
444+ + frameSize ,
445+ error );
449446 }
450447 return frame ;
451448 }
0 commit comments