Skip to content

Commit

Permalink
ignore decode errors in shader log
Browse files Browse the repository at this point in the history
  • Loading branch information
szabolcsdombi committed Aug 4, 2024
1 parent 89619b1 commit 25ee9d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions _zengl.py
Original file line number Diff line number Diff line change
Expand Up @@ -614,12 +614,12 @@ def include(match):

def compile_error(shader: bytes, shader_type: int, log: bytes):
name = {0x8B31: 'Vertex Shader', 0x8B30: 'Fragment Shader'}[shader_type]
log = log.rstrip(b'\x00').decode()
log = log.rstrip(b'\x00').decode(errors='ignore')
raise ValueError(f'{name} Error\n\n{log}')


def linker_error(vertex_shader: bytes, fragment_shader: bytes, log: bytes):
log = log.rstrip(b'\x00').decode()
log = log.rstrip(b'\x00').decode(errors='ignore')
raise ValueError(f'Linker Error\n\n{log}')


Expand Down

0 comments on commit 25ee9d1

Please sign in to comment.