Changed ContextError handling

Changed it so ContextError is passed by value instead of by pointer.