<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED NOTOURBUG - Can't change Primary Key's name with Firebird Embedded db."
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=108068#c7">Comment # 7</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED NOTOURBUG - Can't change Primary Key's name with Firebird Embedded db."
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=108068">bug 108068</a>
              from <span class="vcard"><a class="email" href="mailto:lionel@mamane.lu" title="Lionel Elie Mamane <lionel@mamane.lu>"> <span class="fn">Lionel Elie Mamane</span></a>
</span></b>
        <pre>(In reply to Julien Nabet from <a href="show_bug.cgi?id=108068#c4">comment #4</a>)
<span class="quote">> Lionel: I thought about throwing with ::dbtools::throwSQLException (...)</span >

<span class="quote">> but don't know how to retrieve the error message from Firebird engine.</span >

>From the error message you quoted from the console, we see that this message
comes from
<a href="http://opengrok.libreoffice.org/xref/core/connectivity/source/drivers/firebird/Util.cxx#52">http://opengrok.libreoffice.org/xref/core/connectivity/source/drivers/firebird/Util.cxx#52</a>
so look there, we see it is function
firebird::StatusVectorToString
so that's your answer :)
See how it is called from


Throwing an SQLException is indeed in general the way to do that kind of
things. In general LibreOffice then has a decent dialog for the error message,
that shows the contents of the SQLException behind a "more" button (or
something like that).

Here, there's a mechanism that implements the
 The column "ID2" could not be changed.
message, that probably interferes with that. Possibly, the SQLException is
already thrown, but caught (and ignored) by that mechanism. Then, I think the
right thing to do is to change that dialog box to have the "more" button to
show the actual SQL error, like the default mechanism.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>