Skip to main content
This forum is closed to new posts and responses. New discussions are now taking place in the IBM Developer Answers forum.
 
developerWorks
AIX and UNIX
Information Mgmt
Lotus
New to Lotus
Products
How to buy
Downloads
Live demos
Technical library
Training
Support
Forums & community
Events
Rational
Tivoli
WebSphere
Java™ technology
Linux
Open source
SOA and Web services
Web development
XML
My developerWorks
About dW
Submit content
Feedback



developerWorks  >  Lotus  >  Forums & community  >  Enterprise Integration Forum

Enterprise Integration Forum

developerWorks

  

Sign in to participate PreviousPrevious NextNext

RE: Forcing LEI to throw error
Eric Forte 27.Nov.12 09:37 PM a Web browser
LC LSX LEI - 7.0; LC LSX - All Releases Windows


Daniel,
I never saw your post. I know this was a while ago, but I've attached an example below.

In rereading my original post, I should clarify. The scripted activity that calls this agent should send an email when there is an error, but it does not and therefore, we have many scripted activities (written over the course of years, preceding my arrival) that send email as below. However, sometime, we receive two emails: one from LEI and one because of the code in the error handler, so my original reason for posting is to see if there is a way that we can force the error in the error handler, such that LEI will see it as an error and send the email to the people listed on the activity document and not have to have duplicate functionality to send email in the error handler.

Thanks in advance,
Eric

======================
Sub Initialize
On Error Goto ErrorHandler

Dim s As New NotesSession
Dim curDb As NotesDatabase
Dim lcSess As LCSession
Dim view As NotesView
Dim agent As NotesAgent
Dim memo As NotesDocument, doc As NotesDocument
Dim subject As String, serverName As String, activityName As String

Set curDb = s.CurrentDatabase

REM--------------Environment Config------------------
Set lcSess = New LCSession(s.CurrentAgent.name)
activityName = lcSess.name

Call lcSess.Logtext (LCLOGSTREAMF_EVENT, "Beginning session: '" + activityName + "'", 0)

REM Will throw error
Set doc = view.GetFirstDocument

Exit Sub

ErrorHandler:
subject = curDb.title + " - " + activityName + " failed error #" + Cstr(Err) + " " + Error + " on line " + Cstr(Erl)

Call lcSess.Logtext (LCLOGSTREAMF_EVENT, subject, 0)

Set memo = New NotesDocument( curDb )
memo.Subject = subject
Call memo.Send( False , "Eric Forte" )
End Sub




Forcing LEI to throw error (Eric Forte 15.Oct.12)
. . RE: Forcing LEI to throw error (Daniel W Heiche... 19.Oct.12)
. . . . RE: Forcing LEI to throw error (Eric Forte 27.Nov.12)
. . . . . . RE: Forcing LEI to throw error (Eric Forte 18.Jan.13)


Document Options






  Document options
Print this pagePrint this page

Search this forum

Forum views and search


  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Author
Category
Platform
Release
Advanced search

Sign In or Register

 Sign In or Register
Sign in
Forgot your password?
Forgot your user name?
Create new registration

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS
More Lotus RSS feeds

Resources

 Resources
Forum use and etiquette
Native Notes Access
Web site Feedback

Lotus Support

 Lotus Support
IBM Support Portal - Lotus software
Lotus Support documents
Lotus support by product
Lotus support downloads
Lotus support RSS feeds

Wikis

 Wikis
IBM Composite Applications
IBM Mashup Center
IBM Connections
IBM Connections Cloud Developers
IBM Docs
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud for Social Business
IBM Web Experience Factory
Lotus Domino
Lotus Domino Designer
Lotus Expeditor
Lotus Foundations
Lotus iNotes
Lotus Instructor Community Courseware
Lotus Notes
Lotus Notes & Domino Application Development
Lotus Notes Traveler
Lotus Protector
Lotus Quickr
Lotus Symphony
IBM Web Content Manager
WebSphere Portal

Lotus Forums


 Lotus Forums
Notes/Domino 9.0
Notes/Domino 8.5 + Traveler
Notes/Domino XPages development forum
Notes/Domino 8
Notes/Domino 6 and 7
IBM Connections
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
Lotus Enterprise Integration
Lotus Protector
Lotus Quickr
Lotus SmartSuite