Skip to content

Commit 01cf6ea

Browse files
committed
Only supress abort error
1 parent 6431e61 commit 01cf6ea

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/render/program.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export class Program<Us extends UniformBindings> {
9494
gl.compileShader(fragmentShader);
9595

9696
if (!gl.getShaderParameter(fragmentShader, gl.COMPILE_STATUS)) {
97-
throw new Error(`WebGL: Could not compile fragment shader: ${gl.getShaderInfoLog(fragmentShader)}`);
97+
throw new Error(`Could not compile fragment shader: ${gl.getShaderInfoLog(fragmentShader)}`);
9898
}
9999

100100
gl.attachShader(this.program, fragmentShader);
@@ -108,7 +108,7 @@ export class Program<Us extends UniformBindings> {
108108
gl.compileShader(vertexShader);
109109

110110
if (!gl.getShaderParameter(vertexShader, gl.COMPILE_STATUS)) {
111-
throw new Error(`WebGL: Could not compile vertex shader: ${gl.getShaderInfoLog(vertexShader)}`);
111+
throw new Error(`Could not compile vertex shader: ${gl.getShaderInfoLog(vertexShader)}`);
112112
}
113113

114114
gl.attachShader(this.program, vertexShader);
@@ -128,7 +128,7 @@ export class Program<Us extends UniformBindings> {
128128
gl.linkProgram(this.program);
129129

130130
if (!gl.getProgramParameter(this.program, gl.LINK_STATUS)) {
131-
throw new Error(`WebGL: Program failed to link: ${gl.getProgramInfoLog(this.program)}`);
131+
throw new Error(`Program failed to link: ${gl.getProgramInfoLog(this.program)}`);
132132
}
133133

134134
gl.deleteShader(vertexShader);

src/ui/map.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ import {MercatorTransform} from '../geo/projection/mercator_transform';
6464
import {ITransform} from '../geo/transform_interface';
6565
import {ICameraHelper} from '../geo/projection/camera_helper';
6666
import {MercatorCameraHelper} from '../geo/projection/mercator_camera_helper';
67+
import {isAbortError} from '../util/abort_error';
6768

6869
const version = packageJSON.version;
6970

@@ -3342,7 +3343,7 @@ export class Map extends Camera {
33423343
this._frameRequest = null;
33433344
this._render(paintStartTimeStamp);
33443345
}).catch((error: Error) => {
3345-
if (error.message.startsWith('WebGL:')) {
3346+
if (!isAbortError(error)) {
33463347
throw error;
33473348
}
33483349
}); // ignore abort error

0 commit comments

Comments
 (0)