Conditionally cancel addition of a line item

Hello there,
I would like to conditionally cancel the addition of a line item via BeforeLineItemAddedEvent and display an error msg to the user, how may I implement this feature?