From 65dc4fdbf8c6117606124f5459c3103bdda5f304 Mon Sep 17 00:00:00 2001 From: drawcall Date: Wed, 24 Jul 2024 10:43:22 +0800 Subject: [PATCH] feat: add catch error log --- lib/node/gif.js | 4 +++- lib/node/subtitle.js | 4 +++- lib/node/video.js | 4 +++- package.json | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/node/gif.js b/lib/node/gif.js index 343cc088..5e277893 100644 --- a/lib/node/gif.js +++ b/lib/node/gif.js @@ -67,7 +67,9 @@ class FFGifImage extends FFImage { try { const info = await this.geGifInfo(); fps = Number(info.fps); - } catch (e) {} + } catch (e) { + console.log(this.getPath(), e); + } return await this.extractGif(fps); } diff --git a/lib/node/subtitle.js b/lib/node/subtitle.js index 8df73cb4..bb6060a0 100755 --- a/lib/node/subtitle.js +++ b/lib/node/subtitle.js @@ -60,7 +60,9 @@ class FFSubtitle extends FFNode { const options = { verbose: true }; const captions = subsrt.parse(content, options); return captions; - } catch (e) {} + } catch (e) { + console.log(e); + } } return []; diff --git a/lib/node/video.js b/lib/node/video.js index 177c5e4b..9bf6a0a9 100755 --- a/lib/node/video.js +++ b/lib/node/video.js @@ -148,7 +148,9 @@ class FFVideo extends FFImage { try { const info = await this.getVideoInfo(); this.materials.info = info; - } catch (e) {} + } catch (e) { + console.log(e); + } this.resetDurationTime(); if (this.audio){ diff --git a/package.json b/package.json index 948ea93f..714f756f 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ffcreator", - "version": "7.3.5", + "version": "7.3.6", "description": "FFCreator is a lightweight and flexible short video production library", "main": "lib/index.js", "types": "types/index.d.ts",