Skip to content

Commit

Permalink
Update main.ts
Browse files Browse the repository at this point in the history
+ print errors
+ rename 'BREAK' to 'ERROR' (in catch)
  • Loading branch information
Avizhen authored May 5, 2021
1 parent cf6d2bd commit 6b92a55
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ class kandoo {
Deno.writeTextFileSync(this.path + '/' + fileName(key), value);
}
catch (err) {
return 'BREAK: ' + err.name;
return 'ERROR: ' + err.name;
console.log(err);
}
return 'OK';
}
Expand All @@ -31,7 +32,8 @@ class kandoo {
var value = Deno.readTextFileSync(this.path + '/' + fileName(key));
}
catch (err) {
return 'BREAK: ' + err.name;
return 'ERROR: ' + err.name;
console.log(err);
}
return value;
}
Expand All @@ -44,11 +46,12 @@ class kandoo {
Deno.removeSync(this.path + '/' + fileName(key));
}
catch (err) {
return 'BREAK: ' + err.name;
return 'ERROR: ' + err.name;
console.log(err);
}
return 'OK';
}
}


export { kandoo };
export { kandoo };

0 comments on commit 6b92a55

Please sign in to comment.