Skip to Content
avatar image
Former Member

"ID:" along with Error Message while highlighting the field.

Hi All,

Is it possible to remove "ID" from error message while highlighting the field. I am not getting this while displaying the message but it is there at the highlighted field. Please give your comments on this.

I used below syntax.

ae.chainAtEnd(parentBean.createApplicationException("COLLABORATORS","custom",(ae.getMessage())));

Thanks,

Naresh.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Apr 13, 2016 at 02:41 PM

    Hi Naresh,


    The system is showing "ID:" because that method is designed to work with a Localized Resource, and the system can't find the LR mentioned while calling the API.



    For example:


    throw doc.createApplicationException("COLLABORATORS", "zcustom", "exception.Error_reading_system_property");

    - will translate to the underlying resource:

    while:

    throw doc.createApplicationException("COLLABORATORS", "zcustom", "blabla non existent");

    - will show the non-existent resource ID

    The method itself is designed like that to provide a method for displaying *soft* error messages, with translation support (very important ! - LR is translated to the user's language setting). It's not useful for users to be shown a "NullPointerException at line 999" 😊; and you could always log the full stack traces for support/debug.

    Regards,

    Bogdan


    1.JPG (12.8 kB)
    2.JPG (11.3 kB)
    Add comment
    10|10000 characters needed characters exceeded

    • Hi Naresh,

      The code is setting the resourceID on the main exception (which goes on the document header).

      The nested exception is a totally different one (basically a new object), part of the exception chain.

      My initial message explains why "ID:" is showing up in general.

      Bogdan

  • avatar image
    Former Member
    Apr 13, 2016 at 03:36 PM

    Hi Bogdan,

    Thanks. Please let me know if there is any idea on resolving it for chained exceptions.

    Thanks,

    Naresh

    Add comment
    10|10000 characters needed characters exceeded