From what I read in the code I would have expected to see some `NS_ERROR_*` result already here coming from the previous call? ``` QM_TRY_INSPECT(const auto& stmt, CreateAndExecuteSingleStepStatement< SingleStepResult::ReturnNullIfNoResult>( aConnection, "SELECT version FROM database"_ns)); QM_TRY(OkIf(stmt), Err(NS_ERROR_FILE_CORRUPTED)); <---------- We fail here but without error? ```
Bug 1704432 Comment 1 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
From what I read in the code I would have expected to see some `NS_ERROR_*` result already here coming from the previous call? ``` QM_TRY_INSPECT(const auto& stmt, CreateAndExecuteSingleStepStatement< SingleStepResult::ReturnNullIfNoResult>( aConnection, "SELECT version FROM database"_ns)); QM_TRY(OkIf(stmt), Err(NS_ERROR_FILE_CORRUPTED)); <---------- We fail here but without error? ``` IIUC, the OkIf condition is the underlying error here, that is `stmt == nullptr`. So actually we have an arbitrary error during QM_TRY_INSPECT that makes `stmt` to be returned as `nullptr` (due to `SingleStepResult::ReturnNullIfNoResult`), which we then intercept and interpret as `NS_ERROR_FILE_CORRUPTED`, ignoring what really happened to our `SELECT` statement.
From what I read in the code I would have expected to see some `NS_ERROR_*` result already here coming from the previous call? ``` QM_TRY_INSPECT(const auto& stmt, CreateAndExecuteSingleStepStatement< SingleStepResult::ReturnNullIfNoResult>( aConnection, "SELECT version FROM database"_ns)); QM_TRY(OkIf(stmt), Err(NS_ERROR_FILE_CORRUPTED)); <---------- We fail here but without error? ```