Just make those two `protected` in inherited exception and remove whole copy&pasted code.