From 9de779344c33033b89a2e08417934cecc9cb4756 Mon Sep 17 00:00:00 2001 From: Yuri Roubinsky Date: Mon, 16 Aug 2021 11:25:20 +0300 Subject: Makes a clear error message if shader compilation failed --- servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp') diff --git a/servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp b/servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp index 14b2768c29..f8aefdb29c 100644 --- a/servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp +++ b/servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp @@ -1970,8 +1970,7 @@ void RendererCanvasRenderRD::ShaderData::set_code(const String &p_code) { RendererCanvasRenderRD *canvas_singleton = (RendererCanvasRenderRD *)RendererCanvasRender::singleton; Error err = canvas_singleton->shader.compiler.compile(RS::SHADER_CANVAS_ITEM, code, &actions, path, gen_code); - - ERR_FAIL_COND(err != OK); + ERR_FAIL_COND_MSG(err != OK, "Shader compilation failed."); if (version.is_null()) { version = canvas_singleton->shader.canvas_shader.version_create(); -- cgit v1.2.3