Fix #297 - Provide better initialization errors
This commit is contained in:
parent
1283535d75
commit
286074f519
|
@ -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