From 3f814c9f9faf2bd3386434792a012c058582f481 Mon Sep 17 00:00:00 2001 From: Marcel Ball Date: Mon, 29 Jan 2018 20:48:54 -0400 Subject: [PATCH] Improved error message in setting register field --- src/frontend/peripheral.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontend/peripheral.ts b/src/frontend/peripheral.ts index a0e90bbe..b3c65b90 100644 --- a/src/frontend/peripheral.ts +++ b/src/frontend/peripheral.ts @@ -338,7 +338,7 @@ export class RegisterNode extends BaseNode { return new Promise((resolve, reject) => { var limit = Math.pow(2, width); if(value > limit) { - return reject('Value entered is invalid. Maximum value for this field is ' + (limit - 1) + ' (0x' + hexFormat(limit-1, 0) + ')') + return reject(`Value entered is invalid. Maximum value for this field is ${limit - 1} (${hexFormat(limit-1, 0)})`); } else { let mask = createMask(offset, width);