Can be shortened to `memcpy(errmsg_, msg, size + 1)` and maybe set `size_t size = strlen(msg) + 1` above so you don't have to do it twice afterwards.