[CupCake.Debug] Throw an exception if something wrong happens