Skip to content

Commit 821eb58

Browse files
committed
Refactor: Improve error message
The error message now shows the invalid value
1 parent a482299 commit 821eb58

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

exercises/tiered_pricing/solutions/xetxeberria-ts/src/tieredPricing.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const priceTiers = [
99
export function tieredPricing(licenseAmount: number): number {
1010
if (licenseAmount < 0)
1111
throw new Error(
12-
"Invalid license amount. License amount can not be negative"
12+
`Invalid license amount <${licenseAmount}>. License amount can not be negative`
1313
);
1414

1515
const licensePrice = calculateLicensePrice(licenseAmount);

0 commit comments

Comments
 (0)