Skip to content

Commit e76d0ae

Browse files
committed
feat: describe the unexpected type if message is not a string
1 parent aadadc1 commit e76d0ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/factories/createLogger.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ export const createLogger = (
109109
);
110110
} else {
111111
if (typeof b !== 'string') {
112-
throw new TypeError('Message must be a string.');
112+
throw new TypeError('Message must be a string. Received ' + typeof b + '.');
113113
}
114114

115115
message = printf(

0 commit comments

Comments
 (0)