Not displaying original error message if error in trigger


Author
Message
Chan
Chan
Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi,

I faced situation that, if my trigger hit any error, SF doesn't report the error message occurred in trigger when save. Instead, it will somehow show "Object reference is not set". I guess it is caused by SF will continue the rest of code even save is failed.



Any way to prevent it?



Thank you
StrataFrame Team
S
StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Was it an INSERT, UPDATE, or DELETE trigger?  I'll try to reproduce it on this end...

It is strange, though, that the exception would not be caught.  Though likely, the return value during an ExecuteDataReader operation could be null if the trigger throws an error, so that may be causing it.

Chan
Chan
Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi,

I can't remember whether if only happen to ParentBO's trigger while to I call childBO.save.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search