oceanbase/seekdb

[Enhancement]: [embed] return meaningful error message to user

Open

#8 geöffnet am 7. Nov. 2025

Auf GitHub ansehen
 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)C++ (242 Forks)github user discovery
help wantedmodule: embedtype: enhancementvibe coding: hard

Repository-Metriken

Stars
 (2.613 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 3T 3h) (47 gemergte PRs in 30 T)

Beschreibung

Enhancement The error messages returned to user is not clear enough, for example:

>>> seekdb.open()
>>> seekdb.open()
[seekdb] seekdb has opened
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
RuntimeError: open seekdb failed 4005 The object is initialized twice

Maybe we can transfer internal error information to mysql error message. There're some help functions to convert oceanbase error message to user message:

// in file src/share/ob_errno.h
int ob_mysql_errno(const int oberr);
  int ob_mysql_errno_with_check(const int oberr);
  const char *ob_sqlstate(const int oberr);
  const char *ob_strerror(const int oberr);
  const char *ob_str_user_error(const int oberr);

Contributor Guide