Notifications
Announcements
No record found.
Class A { public str B() { try { ...... classC = new classC(); D = classC.process(); } catch (Exception::CLRError) { ....... } catch (Exception::Error) { ....... } return B; } } Class classC() { public str D() { try // 1st-level try { ...... salestable.insert(); while select lines { try { ........ salesline.insert(); } catch (Exception::Deadlock) { if (xSession::currentRetryCount() >= #RetryNum) { throw Exception::Deadlock; } else { retry; } } catch (Exception::UpdateConflict) { if (appl.ttsLevel() == 0) { if (xSession::currentRetryCount() >= #RetryNum) { throw Exception::UpdateConflictNotRecovered; } else { retry; } } else { throw Exception::UpdateConflict; } } catch(Exception::DuplicateKeyException) { if (appl.ttsLevel() == 0) { if (xSession::currentRetryCount() >= #RetryNum) { throw Exception::DuplicateKeyExceptionNotRecovered; } else { retry; } } else { throw Exception::DuplicateKeyException; } } catch (Exception::Error) { container infoData = infolog.infologData(); Str1260 errorTxt; for (int i = 1; i <= conLen(infoData); i++) { container internalInfoData = conPeek(infoData, i); if (errorTxt == "") { errorTxt = conPeek(internalInfoData, 2); } else { errorTxt += ";" + conPeek(internalInfoData, 2); } } errorMessage = errorTxt; throw Error(errorMessage); } } // end while select } // end 1st-level try catch (Exception::Deadlock) { if (xSession::currentRetryCount() >= #RetryNum) { throw Exception::Deadlock; } else { retry; } } catch (Exception::UpdateConflict) { if (appl.ttsLevel() == 0) { if (xSession::currentRetryCount() >= #RetryNum) { throw Exception::UpdateConflictNotRecovered; } else { retry; } } else { throw Exception::UpdateConflict; } } catch(Exception::DuplicateKeyException) { if (appl.ttsLevel() == 0) { if (xSession::currentRetryCount() >= #RetryNum) { throw Exception::DuplicateKeyExceptionNotRecovered; } else { retry; } } else { throw Exception::DuplicateKeyException; } } catch (Exception::Error) { container infoData = infolog.infologData(); Str1260 errorTxt; for (int i = 1; i <= conLen(infoData); i++) { container internalInfoData = conPeek(infoData, i); if (errorTxt == "") { errorTxt = conPeek(internalInfoData, 2); } else { errorTxt += ";" + conPeek(internalInfoData, 2); } } errorMessage = errorTxt; throw; } return D; } }
class A { public void B() { System.Exception ex; try { new ClassC().process(); } catch (ex) { ... do something with ex ... } return ''; } } class ClassC() { public void process() { try { throw error("Test error"); } catch (Exception::Error) { container infoData = infolog.infologData(); str errorTxt; for (int i = 1; i <= conLen(infoData); i++) { container internalInfoData = conPeek(infoData, i); if (errorTxt == "") { errorTxt = conPeek(internalInfoData, 2); } else { errorTxt += ";" + conPeek(internalInfoData, 2); } } throw error(errorTxt); } } }
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 660 Most Valuable Professional
André Arnaud de Cal... 549 Super User 2025 Season 2
Sohaib Cheema 307 User Group Leader