summaryrefslogtreecommitdiff
path: root/src/node/handler/ImportHandler.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/node/handler/ImportHandler.js')
-rw-r--r--src/node/handler/ImportHandler.js8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/node/handler/ImportHandler.js b/src/node/handler/ImportHandler.js
index a511637c..67698651 100644
--- a/src/node/handler/ImportHandler.js
+++ b/src/node/handler/ImportHandler.js
@@ -232,11 +232,9 @@ exports.doImport = function(req, res, padId)
if(!directDatabaseAccess){
var fileEnding = path.extname(srcFile).toLowerCase();
if (abiword || fileEnding == ".htm" || fileEnding == ".html") {
- try{
- importHtml.setPadHTML(pad, text);
- }catch(e){
- apiLogger.warn("Error importing, possibly caused by malformed HTML");
- }
+ importHtml.setPadHTML(pad, text, function(e){
+ if(e) apiLogger.warn("Error importing, possibly caused by malformed HTML");
+ });
} else {
pad.setText(text);
}