Community
Participate
Working Groups
EDT code package explore; handler CreateResultFile private trService TestResultService{@dedicatedService{}}; function createFile(fileDirectory String in, fullFileName String in, fileContent String in) call trService.createFile(fileDirectory, fullFileName, fileContent) returning to fileCreated onException ServiceLib.serviceExceptionHandler; end private function fileCreated(absoluteFilePath string in) syslib.writeStdOut("The result file: " + absoluteFilePath + " is created"); end end Gets validation error: IWN.VAL.6619.e 11/119 CreateResultFile - ServiceLib.serviceExceptionHandler cannot be resolved. At line 11 in file \FrameworkMini\eglsource\explore\CreateResultFile.egl
I have updated the definition of ServiceLib to make this field static. I also changed some validation code in DefaultBinder that was incorrect.
verified
Closing this defect.
(In reply to comment #3) > Closing this defect. I'm still seeing the problem. IWN.VAL.6619.e 15/29 TestService - ServiceLib.serviceExceptionHandler cannot be resolved. At line 15 in file \MyProject\EGLSource\client\TestService.egl Build: Version: 0.7.0.v201111270901-1CT-Fiv5_LLLMAxfU_J My code: handler TestService type RUIhandler{initialUI =[ui], onConstructionFunction = start, cssFile = "css/MyProject.css", title = "TestService"} ui Div { }; DataSvc DataSvc? { @DedicatedService }; function start() call DataSvc.getItems() returning to CB_getItems onException ServiceLib.serviceExceptionHandler; end function CB_getItems(texts string[] in) for (x int from 1 to texts.getSize()) ui.appendChild(new HTML { text = texts[x] }); end end end
in EDT, we no longer have ServiceLib.serviceExceptionHandler defined as system library/delegate, end user must define their own callback function for exception handling
(In reply to comment #5) > in EDT, we no longer have ServiceLib.serviceExceptionHandler defined as system > library/delegate, end user must define their own callback function for > exception handling Why was that done? Now every piece of code that used that handler as a convenient default handler for unexpected exceptions has to be modified.
(In reply to comment #6) > (In reply to comment #5) > > in EDT, we no longer have ServiceLib.serviceExceptionHandler defined as system > > library/delegate, end user must define their own callback function for > > exception handling > > Why was that done? Now every piece of code that used that handler as a > convenient default handler for unexpected exceptions has to be modified. There are at least a couple reasons for this. There is more information than just the exception. There is also the HttPResponse which sometimes contains more information and some users choose to print that instead of just the exception. writestdout is really not a good way of displaying the information, it's quick, but from looking at many RBD applications it's not the best way. So we leave it up to the developers to determine what they want to display and how they want to display it, writestdout, html, sending it back to a service to be logged to a file, etc. This kind of thing is something that could just as easily be developed as a utility library based on your needs and you use it in all of your projects.