Merge pull request #326 from gideonthomas/issue297
Fix #297 - Provide better initialization errors
This commit is contained in:
commit
e39129a7f4
|
@ -39,6 +39,13 @@ function maybeCallback(callback) {
|
|||
};
|
||||
}
|
||||
|
||||
// Default callback that logs an error if passed in
|
||||
function defaultCallback(err) {
|
||||
if(err) {
|
||||
console.error('Filer error: ', err);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* FileSystem
|
||||
*
|
||||
|
@ -69,7 +76,7 @@ function maybeCallback(callback) {
|
|||
*/
|
||||
function FileSystem(options, callback) {
|
||||
options = options || {};
|
||||
callback = callback || nop;
|
||||
callback = callback || defaultCallback;
|
||||
|
||||
var flags = options.flags;
|
||||
var guid = options.guid ? options.guid : defaultGuidFn;
|
||||
|
|
Loading…
Reference in New Issue