Rearranges execption handling to test getHeader() better