Author:ptrace Comitter:ptrace Date:2026-05-21 04:32:27 UTC

added caller location to error reports

diff --git a/htmltemplate/lib.jai b/htmltemplate/lib.jai index cb8407e..a6db6e9 100644 --- a/htmltemplate/lib.jai +++ b/htmltemplate/lib.jai @@ -51,11 +51,15 @@ generate :: (     queue_action: [..]Action,     template_fp_or_string: string,     input_kind: enum { STRING; FILE; },     html_fp: string = ""     html_fp: string = "",     loc := #caller_location ) -> (success: bool, html: string, exit_code: Exit_Codes, error_message: string) {     return_if_err :: (exit_code: Exit_Codes) #expand {         if had_error then `return false, "", exit_code, error_string;         if had_error {             error_string = sprint("%: %", loc, error_string);             `return false, "", exit_code, error_string;         }     }     had_error = false; @@ -123,9 +127,6 @@ commit :: (queue_action: *[..]Action, id: string, value: []string) {     array_add(queue_action, action); } /** TODO(adam, 5): If not inlined it will result in bogus data in `queue_action`.                    This is quite janky. Investigate. */ commit :: (queue_action: *[..]Action, id: string, value: string) {     commit(queue_action, id, .[value]); }