put the integer check and thrown exception only in the Const section