asar coverage - build #325


src/asar/
File: src/asar/errors.cpp
Date: 2025-11-04 16:32:25
Lines:
7/7
100.0%
Functions:
1/1
100.0%
Branches:
6/10
60.0%

Line Branch Exec Source
1 #include <cassert>
2 #include <cstdarg>
3
4 #include "std-includes.h"
5 #include "errors.h"
6 #include "interface-shared.h"
7 #include "libstr.h"
8
9 473 void error_impl(const char* error_id, const char* fmt_string, int whichpass, ...) {
10 473 va_list args; va_start(args, whichpass);
11 241 char error_buffer[1024];
12
2/2
✓ Branch 0 taken 232 times.
✓ Branch 1 taken 241 times.
473 vsnprintf(error_buffer, sizeof(error_buffer), fmt_string, args);
13
14 // convert err_xxx -> Exxx
15
3/6
✓ Branch 0 taken 232 times.
✗ Branch 1 not taken.
✓ Branch 2 taken 473 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 241 times.
✗ Branch 5 not taken.
473 string errname = STR "E" + (error_id + 4);
16
17
1/2
✓ Branch 0 taken 473 times.
✗ Branch 1 not taken.
473 error_interface(errname.data(), whichpass, error_buffer);
18 714 }
19