try
{
string [] results = sql("Jira","SELECT [Name] FROM [V_Institution]);
runnerLog("SQL query completed");
}
catch string err
{
runnerLog("SQL query failed : " + err);
}
catch {
runnerLog("SQL query failed.");
}
Hi all,
The catch all clause will catch the exception when the sql query failed.
How can the script get the query error message to show it immediately to the user ?
Thanks in advance for your help.
So, here is the answer of the developer Radu Dumitriu : (It's not possible yet)
Anyway, I kept it in mind, and I wrote it on the ticket that lists the language improvements.
Not sure what Jira app you are using to implement this SIL Script. I'm going to assume that you are using Power Scripts | Jira Workflow Automation. If yes, then you can use:
lfShowFieldMessage(field, message, messageClass)
For more information, you may refer to lfShowFieldMessage.
I hope that this helps.
Thanks,
Moga
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Moga,
Yes I use PowerScript.
And yes I know lfShowFieldMessage.
But the problem here is not to display the message, but to get it.
Thanks for your answer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
From their documentation; Error handling - it looks like they are trying to keep it as user-friendly as possible by returning empty values rather than throwing exceptions where possible.
From what I can understand, if we use catch-all error, then we might not able to access the error. To confirm this, you might want to contact their support.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have no answer from the support so far.
I will post it when received.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.