- Sanjay Shivade
- PowerBuilder
- Friday, 11 January 2019 09:38 PM UTC
Hi,
I am in the process of evaluating migration of our PB 9.0.2 code to PB 2017 version of yours. My 4K lines of code have weird issue with Try and Catch. As per Migration assistant the details are as follows. Could you review the code and point us in the right direction? Syntactically it's matching with your 2017 Help file so I feel this might be product defect. I will really appreciate your help.
Lines:
try
end try
public function integer getinboxcount ();try
Searchfun
try
replacefun
New Reserved Syntax
The code of one of the functions having this issue is as follows for your reference:
is_featureobjectname = Message.StringParm
TRY
n_crystalreport_exception ln_crystalreport_exception
ln_crystalreport_exception = CREATE n_crystalreport_exception
If IsNull(is_featureobjectname ) or pos(lower(trim(is_featureobjectname)),".rpt")
ln_crystalreport_exception.setMessage("Invalid Feature ObjectName")
throw ln_crystalreport_exception
End If
in_crystalreport_base.getCrystalReport(is_featureobjectname)
CATCH (n_crystalreport_exception ne)
MessageBox("Crystal Report Exception", ne.getMessage(), StopSign!)
return false
END TRY
return true
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.