use exceptions in core