Type Definitions
-
IdFnNotAFunction
-
Error thrown when one tries ot set the id generator function to something that is not a function.
Type:
- TypeError
Examples
const loggerFactory = require( "fs-error-logger" ); //"Not a function!" is not a function const logger = loggerFactory( { idFn: "Not a function!" } );
const loggerFactory = require( "fs-error-logger" ); const logger = loggerFactory( ); logger.setIdFn(0); //0 is not a function
-
PathNotAString
-
Error thrown when one tries ot set the output folder path with something that is not a string.
Type:
- TypeError
Examples
const loggerFactory = require( "fs-error-logger" ); //{} is not a string const logger = loggerFactory( { outputFolder: {} } );
const loggerFactory = require( "fs-error-logger" ); const logger = loggerFactory( ); logger.setOutputFolder(2); //2 is not a string