whenever an exception is thrown in hmc, it opens in pop up with object toString during the clone or any other activity.
how to customize error message (generally in pop up) in hmc
Have a look at this file :
platform/ext/core/resources/localization/core-locales_en.properties
For example to customize missing attributes message (mandatoryattributesvalidator) add this to one of your customized extension 'resources/localization/myextension-locales_en.properties' (core extension is better) :
exception.mandatoryattributesvalidator.missing=My message ({0},{1},{2})
Related
I am working with PDFTron - WebViewer,
Want to know how to handle PDF loading errors and showing customized message, in case of web-viewer
Regards
Bhupesh
The easiest way to do this right now is to modify the ErrorModal component in the UI and replace the error messages there. You'll need to string match the old message and replace it with your own.
The component is located at ui/src/components/ErrorModal/ErrorModal.js and you'll want to change the onError function.
This link describes more about how to edit and build the UI https://www.pdftron.com/documentation/web/guides/ui/advanced-customization
WebViewer has methods that let you display a modal Warning message box, which can be dismissed with its Confirm button or a click outside the dialog, or you can display a modal Error box which has no dismiss buttons and requires you to hit [F5] to refresh the page.
https://www.pdftron.com/api/web/UI.html#.showWarningMessage
https://www.pdftron.com/api/web/UI.html#.displayErrorMessage
Using these is more straightforward than editing the UI code from the pdftron github repo.
I have placed a CMFCLinkCtrl - (control to show the links in the dialog frame) in my modal dialog box application which works perfectly.
upon setting the SetURL("www.google.com") it could able to invoke it.
When i do the same in a dll (dialog box is part of dll) and when the user clicks the control, it is throwing an runtime exception and i could not able to debug it.
I have two questions,
can we use the CMFCLinkCtrl controls inside a dll based out of dialog box?
if so, how to debug and find the issue?
error Image:
thanks,
Saravana
At some time I have removed the code
CWinApp theApp
from the dll implementation, since I'm not using it. That's the reason behind this error. When I added it back it is able to invoke the URL.
As I have mentioned it is get struck in the below line, just explored more on why the failure of AfxGetApp() and found this reason.
void CCmdTarget::BeginWaitCursor()
AfxGetApp()->DoWaitCursor(1)
I want to create the same dialog as the one created when using Dialogs.showException(), but instead of showing the stacktrace, I want to show my custom pre-formatted text. The functionality that I want is the Details button behavior.
What I want is this:
But not with the printed stacktrace.
What I have tried is to create my own Throwable, populate it with StackTraceElement objects(filled with the the text that I need) and overwrite the getStackTrace() method to return the populated array. The problem is that the stack trace is displayed from the point where the exception is thrown so the text that I need is shown at the bottom of the expanded pane.
ControlsFX is an open source project.
The source of the Exception Dialog is available here. I'm a ControlsFX committer, so ping me if you need more information.
Most of my code is error handled with try/catch and OpenLog (modified to handle SSJS exceptions). Unfortunately, exception in SSJS gives hard to read stack trace.
So I need to pass more info - at least event/method where is the error handler. I can simply put "method XY" argument to every OpenLog.logError call, but this makes every handler unique and prone to errors (programmers love copypasta). It would be nice to have LSI_Info equivalent, what makes error handlers constant (so you can define them as template in Eclipse).
Is there any call, which returns "where I am" info of method/event for SSJS code (including libraries)?
Have a look at the code in the Message class of my debug toolbar (found here on GitHub). I contains a way to 'pretty print' errors and also captures a com.ibm.jscript.InterpretException. I use that to send a formatted error message to an OpenLog event document. It (sort of) mimics the information you get in the default XPage error page.
To see what the formatted error looks like go to my toolbar's demo page and hit the Test 1 or Test 2 button. That will throw a SSJS error that is captured by a custom error form. That form writes a message to the toolbar which is configured to also store error messages in a separate OpenLog database.
(toolbar download can be found here on OpenNTF)
How to get original exception Object at portlet_error.jsp as it only shows "ABC Portlet Temporarily Unavailble" but i want to print actual Error/Exception
This JSP-file is included in html/portal/render_portlet.jsp, so you can create a simple JSP Hook that overrides this JSP and display the wanted Exception information.