tests for context handling of the error stack