Another major bugfix in copy_error
This commit is contained in:
parent
046d86423a
commit
fbcfed79b8
@ -104,7 +104,9 @@ void Log_Error_2 (string file_path, string function_name, s32 line_number, Error
|
||||
Error* copy_error (Thread_Context* tctx, Error* old_error) {
|
||||
push_arena(tctx->error_arena);
|
||||
|
||||
Error* error = new_error(old_error->severity, to_string(old_error));
|
||||
string error_string_copy = copy_string(to_string(old_error));
|
||||
|
||||
Error* error = new_error(old_error->severity, error_string_copy);
|
||||
|
||||
error->thread_id = old_error->thread_id;
|
||||
error->source_line = old_error->source_line;
|
||||
@ -221,12 +223,10 @@ ArrayView<Error*> get_all_errors (Thread_Context* tctx) {
|
||||
current_error = current_error->next_error;
|
||||
}
|
||||
|
||||
|
||||
// #TODO(Low priority): also recurse through child threads?
|
||||
// NOTE: I don't think we actually want this, because we merge
|
||||
// our errors on the main thread when we thread_deinit.
|
||||
// for_each(t, tctx->child_threads) {
|
||||
// }
|
||||
// for_each(t, tctx->child_threads) { }
|
||||
|
||||
return error_array;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user