Author:ptrace Comitter:ptrace Date:2026-05-21 04:33:18 UTC Merge: 2e2a6285a680fdd3b93214aeb271890df9b2ed4d ce5b1bd492c762dd12636f4700be0aba331e719d

Merge pull request 'added caller location to error reports' (#7) from fix/missing-caller-location into main

Reviewed-on: https://codeberg.org/ptrace/htmltemplate-jai/pulls/7

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]); }