I have a stored proc that inserts a record into the db. It is attached to a table in the entity framework as the function to perform the inserting. In my domain service I can call it from a method that updates another entity and it works.
Here's an example of what works...
public void UpdateT_sec_sys(t_sec_sys currentt_sec_sys)
t_error_msg msg = new t_error_msg();
It depends on the error and where it came from. For example, the call to OnError may be happening inside a TransactionScope and when that transaction rollsback so does yours. Try the following code:
using (TransactionScope errorTrans = new TransactionScope(TransactionScopeOption.Suppress))
YourObjectContext context = new YourObjectContext;
//your code as is, but using context instead of this.ObjectContext
errorTrans.Complete(); //This is a no-op since the transaction was suppressed. Includes for consistency