summaryrefslogtreecommitdiff
path: root/lib/path.js
diff options
context:
space:
mode:
authormicnic <micnic90@gmail.com>2015-10-15 00:10:25 +0300
committerRoman Reiss <me@silverwind.io>2015-11-09 20:08:36 +0100
commit20285ad17755187ece16b8a5effeaa87f5407da2 (patch)
treefd383b337137f2ab9f1fe51042d29b076f687387 /lib/path.js
parentaf46112828cb28223050597f06b5e45a659e99d6 (diff)
downloadandroid-node-v8-20285ad17755187ece16b8a5effeaa87f5407da2.tar.gz
android-node-v8-20285ad17755187ece16b8a5effeaa87f5407da2.tar.bz2
android-node-v8-20285ad17755187ece16b8a5effeaa87f5407da2.zip
lib: Consistent error messages in all modules
This commit fixes some error messages that are not consistent with some general rules which most of the error messages follow. PR-URL: https://github.com/nodejs/node/pull/3374 Reviewed-By: Roman Reiss <me@silverwind.io>
Diffstat (limited to 'lib/path.js')
-rw-r--r--lib/path.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/path.js b/lib/path.js
index 0c9c656e66..c78883bbd3 100644
--- a/lib/path.js
+++ b/lib/path.js
@@ -338,7 +338,7 @@ win32.dirname = function(path) {
win32.basename = function(path, ext) {
if (ext !== undefined && typeof ext !== 'string')
- throw new TypeError('ext must be a string');
+ throw new TypeError('"ext" argument must be a string');
var f = win32SplitPath(path)[2];
// TODO: make this comparison case-insensitive on windows?
@@ -357,7 +357,7 @@ win32.extname = function(path) {
win32.format = function(pathObject) {
if (pathObject === null || typeof pathObject !== 'object') {
throw new TypeError(
- "Parameter 'pathObject' must be an object, not " + typeof pathObject
+ 'Parameter "pathObject" must be an object, not ' + typeof pathObject
);
}
@@ -365,7 +365,7 @@ win32.format = function(pathObject) {
if (typeof root !== 'string') {
throw new TypeError(
- "'pathObject.root' must be a string or undefined, not " +
+ '"pathObject.root" must be a string or undefined, not ' +
typeof pathObject.root
);
}
@@ -547,7 +547,7 @@ posix.dirname = function(path) {
posix.basename = function(path, ext) {
if (ext !== undefined && typeof ext !== 'string')
- throw new TypeError('ext must be a string');
+ throw new TypeError('"ext" argument must be a string');
var f = posixSplitPath(path)[2];
@@ -574,7 +574,7 @@ posix.format = function(pathObject) {
if (typeof root !== 'string') {
throw new TypeError(
- "'pathObject.root' must be a string or undefined, not " +
+ '"pathObject.root" must be a string or undefined, not ' +
typeof pathObject.root
);
}