update assertThrows, fixes #220

Given a constructor as function, try to get the error name from its prototype or itself before relying on the old behaviour. Closes #220