error when calling agent from xpage button - xpages

I am receiving an error when trying to call an agent from an xpages button click: Error below
Error while executing JavaScript action expression
Script interpreter error, line=2, col=7: [TypeError] Exception occurred calling method NotesAgent.runWithDocumentContext(lotus.domino.local.Document) null
JavaScript code
var agent=database.getAgent("xpCreateNewCopy");
agent.runWithDocumentContext(currentDocument.getDocument());

I had missed an important setting, run as web user. Problem solved.

Related

Electron Crashing On Exception, Even With uncaughtException Handled

Im trying to prevent my application crashing when and unhandled exception occurs.
I've added a
process.on("uncaughtException", err => {
dialog.showErrorBox("Uh oh...", `${err}`);
});
and im just triggering a false exception by calling a function that doesn't exist inside of a main process method, triggered by a button click and an IPC call from the rendered UI.
start() {
this.blah(); // ReferenceError blah is not defined
}
to my main process file, although now I just get two dialogs, the first default electron one, showing the stack track and error, then the one prompted by me, followed by the application crashing.
So it appears it's hitting the uncaught exception handler, although it just pops up the dialog and continues.
How can I prevent the app from crashing, and only display the one dialog box from my handler?

Show error message in veiw correspoing to action method in mvc5

I need to show exception that occurred in on the same view in mvc on click of sumit button of view..
i have a exception filter in App_Start that register in application start event
but when exception occurred it show the same error page always
Refer to this link.
http://www.dotnetcurry.com/aspnet-mvc/1068/aspnet-mvc-exception-handling
might this will solve your query

Unable to fail C# test using assert.fail method

I am creating a test in codedUI, VS2013. I am using assert.fail(failuredescripion) inside my exception class. But I am getting the below mentioned error:
An exception of type 'Microsoft.VisualStudio.TestTools.UnitTesting.AssertFailedException' occurred in Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll but was not handled in user code
Additional information: Assert.Fail failed.
Can anyone please suggest how to achieve this?
I want the failure to be recorded forcefully.
I found answer from this MSDN post
This error is happening because of the exception options. Need to add an exception for the assert namespace and disable both user handled and Thrown in Debug-->Exceptions

Incorrect attribute value type Microsoft.Xrm.Sdk.OptionSetValue

While creating an Incident. I am facing this issue. I have created some incidents and it working fine but sometime it shows this exception "Incorrect attribute value type Microsoft.Xrm.Sdk.OptionSetValue".
How to trace which OptionSetValue throws an error.
I'm going to assume that you're creating these via a C# sdk call. I believe turning on server side tracing would tell you. The other option is if you can debug it locally, catch the exception and manually attempt to update each optionset attribute, one at a time until you find the culprit.

GWT browser returns an error, but GWT does not

I made some changes to GWT app without testing it in the client browser. I just now tested it in the browser and now the browser is throwing an error:
Error: uncaught exception: java.lang.IllegalArgumentException: Widget must be a child of this panel.
How do I figure out why this is being thrown and where to fix it?
I made so many changes in the code between now and last time I tested to figure out where it could possibly be from memory.
Any help would be greatly appreciated.
This error message is thrown (at least) by an AbsolutePanel if you try to call setWidgetPosition, getWidgetLeft or getWidgetTop with a widget as argument that's not a child of the AbsolutePanel. Maybe you call the method before you attach the widget to the Panel.
For debugging you can try the following:
Run in hosted mode and set a debug pointer on the IllegalArgumentException.
Or if you only can find it in client code. I compile with -style pretty and run it in Firefox with FireBug debugger and set Script to break on errors or track throw/catch.

Resources