From 448d8c52a4d9dcb1be592df228fb402c6b3c507c Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Tue, 25 Feb 2020 22:42:39 +0100 Subject: renderer: shaders: nicer error message syntax --- src/renderer/runtime/view/renderer/shaders.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/renderer') diff --git a/src/renderer/runtime/view/renderer/shaders.ts b/src/renderer/runtime/view/renderer/shaders.ts index c00568e..c9810bd 100644 --- a/src/renderer/runtime/view/renderer/shaders.ts +++ b/src/renderer/runtime/view/renderer/shaders.ts @@ -61,14 +61,14 @@ export class Shaders { private getAttribLocation(program: WebGLProgram, name: string): number { const ret = this.gl.getAttribLocation(program, name); - if (ret < 0) throw new Error("unable to get location of attribute '" + name + "'"); + if (ret < 0) throw new Error(`unable to get location of attribute '${name}'`); return ret; } private getUniformLocation(program: WebGLProgram, name: string): WebGLUniformLocation { const ret = this.gl.getUniformLocation(program, name); - if (!ret) throw new Error("unable to get location of uniform '" + name + "'"); + if (!ret) throw new Error(`unable to get location of uniform '${name}'`); return ret; } -- cgit v1.2.3