catch Error in consturctor