Skip to content

Commit 66f9823

Browse files
trflynn89AtkinsSJ
authored andcommitted
LibSQL: Don't interpret AK::Error codes as SQL error codes
This makes error invocations such as Error::from_string_literal become associated with a SQLErrorCode (typically 0, AmbiguousColumnName). The result, when displayed to the user, is quite confusing, e.g.: Column name 'Heap()::write_block(): Oversized block' is ambiguous Instead, just interpret these as internal errors, so the error message is displayed as-is.
1 parent 452285a commit 66f9823

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Userland/Libraries/LibSQL/Result.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ class [[nodiscard]] Result {
9494
}
9595

9696
ALWAYS_INLINE Result(Error error)
97-
: m_error(static_cast<SQLErrorCode>(error.code()))
97+
: m_error(SQLErrorCode::InternalError)
9898
, m_error_message(error.string_literal())
9999
{
100100
}

0 commit comments

Comments
 (0)