[ 
https://issues.apache.org/jira/browse/DERBY-1958?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12888432#action_12888432
 ] 

Eranda Sooriyabandara commented on DERBY-1958:
----------------------------------------------

Hi,
How can I pass parameters to a Error message. 

I use the exception as
throw StandardException.newException(SQLState.FILE_CONTAINER_EXCEPTION,new 
IOException("FAKE FAKE FAKE"),this.toString(),"read",file);

Here is my change to modify  the error message,
Index: java/engine/org/apache/derby/loc/messages.xml
===================================================================
--- java/engine/org/apache/derby/loc/messages.xml       (revision 961244)
+++ java/engine/org/apache/derby/loc/messages.xml       (working copy)
@@ -5724,7 +5724,7 @@
 
             <msg>
                 <name>XSDG3.D</name>
-                <text>Meta-data for Container {0} could not be accessed</text>
+                <text>Meta-data for Container {0} could not be accessed to {1} 
file {2}</text>
                 <arg>containerName</arg>
             </msg>

But still I don't understand how to get the parameters here {1} and {2}.

With this change I am not able to build, The error was 
Could not generate English properties from message descriptors. 

Thanks
Eranda

> improve XSDG3 error to print container, actual i/o operation, and file name.
> ----------------------------------------------------------------------------
>
>                 Key: DERBY-1958
>                 URL: https://issues.apache.org/jira/browse/DERBY-1958
>             Project: Derby
>          Issue Type: Improvement
>          Components: Store
>    Affects Versions: 10.1.3.1, 10.2.1.6, 10.3.1.4
>            Reporter: Mike Matrigali
>            Priority: Trivial
>
> The current error does not give enough information to know what container is 
> the problem:
> ERROR XSDG3: Meta-data for Container
> org.apache.derby.impl.store.raw.data.rafcontai...@10632cd could not be
> accessed 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to