Comparing version 0.0.11 to 0.0.12
{ | ||
"name": "js-ffmpeg", | ||
"description": "JS FFMpeg", | ||
"version": "0.0.11", | ||
"version": "0.0.12", | ||
"author": "Ziggeo", | ||
@@ -6,0 +6,0 @@ "repository": "https://github.com/jsonize/js-ffmpeg", |
@@ -11,4 +11,12 @@ Scoped.require([ | ||
require("child_process").exec(cmd, function (error, stdout, stderr) { | ||
var success = JSON.parse(stdout); | ||
promise.asyncSuccess(success); | ||
if (error) { | ||
promise.asyncError("Cannot read file"); | ||
return; | ||
} | ||
try { | ||
var success = JSON.parse(stdout); | ||
promise.asyncSuccess(success); | ||
} catch (e) { | ||
promise.asyncError("Parse error: " + stdout); | ||
} | ||
}); | ||
@@ -15,0 +23,0 @@ return promise; |
Sorry, the diff of this file is not supported yet
308913
1231