Powerbuilder 11.5 and latest Adobe Reader
It is a window with the an Adobe reader OLE control in it,
I have the following code to try to
1 - not crash the powerbuilder app
2 - hide from the user the scary error message.
TRY
ole_1.object.src_ = is_local_pdf_copy_filepath //the SRC is purposely misspelled to throw an error
CATCH (Throwable the_exception)
string ls_test
ls_test = the_exception.text
TRY
ole_1.object.loadfile_(is_local_pdf_copy_filepath) //the LoadFile is purposely misspelled to throw an error
CATCH (Throwable the_exception2)
ls_test = ls_test + '~r~n' + the_exception2.text
MessageBox('Claim Processing','A problem occurred trying to load the pdf within ADOBE reader. You are not going to be able to prelog this claim. ')
String ls_message
ls_message = 'A problem occurred trying to load the pdf within ADOBE reader. neither the Loadfile or .SRC call worked. ' + '~r~n' +ls_test
this.event ue_send_email_pdf( the_exception2,ls_message)
Close(this)
RETURN
END TRY
END TRY
The try/catch is working in that it doesn't crash the app...but I get an error message on the first call...the second call fails silently like I want
Any ideas how to get the first call to fail silently ?
It is a window with the an Adobe reader OLE control in it,
I have the following code to try to
1 - not crash the powerbuilder app
2 - hide from the user the scary error message.
TRY
ole_1.object.src_ = is_local_pdf_copy_filepath //the SRC is purposely misspelled to throw an error
CATCH (Throwable the_exception)
string ls_test
ls_test = the_exception.text
TRY
ole_1.object.loadfile_(is_local_pdf_copy_filepath) //the LoadFile is purposely misspelled to throw an error
CATCH (Throwable the_exception2)
ls_test = ls_test + '~r~n' + the_exception2.text
MessageBox('Claim Processing','A problem occurred trying to load the pdf within ADOBE reader. You are not going to be able to prelog this claim. ')
String ls_message
ls_message = 'A problem occurred trying to load the pdf within ADOBE reader. neither the Loadfile or .SRC call worked. ' + '~r~n' +ls_test
this.event ue_send_email_pdf( the_exception2,ls_message)
Close(this)
RETURN
END TRY
END TRY
The try/catch is working in that it doesn't crash the app...but I get an error message on the first call...the second call fails silently like I want
Any ideas how to get the first call to fail silently ?