How to cancel rendering from within a render handler?

Hi, how do you cancel a render from within one of the render handlers? Ideally with a message that can be displayed to the user explaining the reason for cancellation.