Skip to content

Commit 86a62ce

Browse files
abetomoctalkington
authored andcommitted
Fix coding style (#263)
https://github.com/archiverjs/node-archiver/blob/master/CONTRIBUTING.md * Fix to match coding style Additional modification of the part where fixes were missing
1 parent 92b9a25 commit 86a62ce

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

lib/error.js

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,30 +9,30 @@
99
var util = require('util');
1010

1111
const ERROR_CODES = {
12-
"ABORTED": "archive was aborted",
13-
"DIRECTORYDIRPATHREQUIRED": "diretory dirpath argument must be a non-empty string value",
14-
"DIRECTORYFUNCTIONINVALIDDATA": "invalid data returned by directory custom data function",
15-
"ENTRYNAMEREQUIRED": "entry name must be a non-empty string value",
16-
"FILEFILEPATHREQUIRED": "file filepath argument must be a non-empty string value",
17-
"FINALIZING": "archive already finalizing",
18-
"QUEUECLOSED": "queue closed",
19-
"NOENDMETHOD": "no suitable finalize/end method defined by module",
20-
"DIRECTORYNOTSUPPORTED": "support for directory entries not defined by module",
21-
"FORMATSET": "archive format already set",
22-
"INPUTSTEAMBUFFERREQUIRED": "input source must be valid Stream or Buffer instance",
23-
"MODULESET": "module already set",
24-
"SYMLINKNOTSUPPORTED": "support for symlink entries not defined by module",
25-
"SYMLINKFILEPATHREQUIRED": "symlink filepath argument must be a non-empty string value",
26-
"SYMLINKTARGETREQUIRED": "symlink target argument must be a non-empty string value",
27-
"ENTRYNOTSUPPORTED": "entry not supported"
12+
'ABORTED': 'archive was aborted',
13+
'DIRECTORYDIRPATHREQUIRED': 'diretory dirpath argument must be a non-empty string value',
14+
'DIRECTORYFUNCTIONINVALIDDATA': 'invalid data returned by directory custom data function',
15+
'ENTRYNAMEREQUIRED': 'entry name must be a non-empty string value',
16+
'FILEFILEPATHREQUIRED': 'file filepath argument must be a non-empty string value',
17+
'FINALIZING': 'archive already finalizing',
18+
'QUEUECLOSED': 'queue closed',
19+
'NOENDMETHOD': 'no suitable finalize/end method defined by module',
20+
'DIRECTORYNOTSUPPORTED': 'support for directory entries not defined by module',
21+
'FORMATSET': 'archive format already set',
22+
'INPUTSTEAMBUFFERREQUIRED': 'input source must be valid Stream or Buffer instance',
23+
'MODULESET': 'module already set',
24+
'SYMLINKNOTSUPPORTED': 'support for symlink entries not defined by module',
25+
'SYMLINKFILEPATHREQUIRED': 'symlink filepath argument must be a non-empty string value',
26+
'SYMLINKTARGETREQUIRED': 'symlink target argument must be a non-empty string value',
27+
'ENTRYNOTSUPPORTED': 'entry not supported'
2828
};
2929

3030
function ArchiverError(code, data) {
31-
Error.captureStackTrace(this, this.constructor);
32-
//this.name = this.constructor.name;
33-
this.message = ERROR_CODES[code] || code;
34-
this.code = code;
35-
this.data = data;
31+
Error.captureStackTrace(this, this.constructor);
32+
//this.name = this.constructor.name;
33+
this.message = ERROR_CODES[code] || code;
34+
this.code = code;
35+
this.data = data;
3636
}
3737

3838
util.inherits(ArchiverError, Error);

0 commit comments

Comments
 (0)