You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's frequently difficult to tell where error codes were first set, even with the message in ArrowError. It'd be possible to modify NANOARROW_RETURN_NOT_OK() to append file names, line numbers, etc to an ArrowError to produce a stack trace of the error code.
ArrowError would need to be expanded to hold this information, since currently its message can only be 1024 bytes (fine for individual methods but stack traces would exceed that easily). Either that limit could be increased or we could add an optional void* stack_trace; member to the struct whose lifetime is managed separately. (Or we could make ArrowError a type which manages memory but that's probably not desirable because we'd need to add ArrowError{Init,Reset} everywhere.)
Given the added complexity, this would probably need to be an optional feature (controlled by a cmake option()).
The text was updated successfully, but these errors were encountered:
It's worth noting that we don't have an ArrowError everywhere we might want a stacktrace (e.g., functions that can only fail with ENOMEM tend to not accept an ArrowError*). Basically everywhere we do a return <something that is not NANOARROW_OK> should maybe turn into ERROR_RETURN(<something that is not NANOARROW_OK>). The whole stack is nice but even just knowing where the first one was lets you set a breakpoint.
but that's probably not desirable because we'd need to add ArrowError{Init,Reset} everywhere.)
Yes, I think that would be disruptive (although some day it might be the right move, as a 1023 character error might be limiting eventually).
An even more disruptive change (but one which only requires deleting code): If we make ArrowError a thread local singleton, we don't need to pass it around as a parameter. There should only be one ArrowError in any stack anyway IIUC
It's frequently difficult to tell where error codes were first set, even with the message in ArrowError. It'd be possible to modify NANOARROW_RETURN_NOT_OK() to append file names, line numbers, etc to an ArrowError to produce a stack trace of the error code.
ArrowError would need to be expanded to hold this information, since currently its message can only be 1024 bytes (fine for individual methods but stack traces would exceed that easily). Either that limit could be increased or we could add an optional
void* stack_trace;
member to the struct whose lifetime is managed separately. (Or we could make ArrowError a type which manages memory but that's probably not desirable because we'd need to addArrowError{Init,Reset}
everywhere.)Given the added complexity, this would probably need to be an optional feature (controlled by a cmake
option()
).The text was updated successfully, but these errors were encountered: