NiKoTron / dart-tags

ID3 Tag parser written on the pure dart language.
https://pub.dartlang.org/packages/dart_tags
MIT License
37 stars 16 forks source link

Unable to catch error "Unhandled Exception: NoSuchMethodError: The method 'decode' was called on null." #34

Open AhmadFadilB opened 3 years ago

AhmadFadilB commented 3 years ago

Not all the MP3 can be decoded and the console return `[VERBOSE-2:ui_dart_state.cc(199)] Unhandled Exception: NoSuchMethodError: The method 'decode' was called on null. Receiver: null Tried calling: decode(Uint8Array)

0 Object.noSuchMethod (dart:core-patch/object_patch.dart:54:5)

1 ID3V2Reader.parseValues

package:dart_tags/…/readers/id3v2.dart:71

2 Reader.read.

package:dart_tags/…/readers/reader.dart:13

3 _rootRunUnary (dart:async/zone.dart:1362:47)

` But the error cannot be catch on try catch or .catchError() The code just stops at `await tp.getTagsFromByteArray(bytes)`, therefore i can't handle the error.