Zend certified PHP/Magento developer

Magento 2 Custom Payment Method: Capture Function Error Handling

When using a custom payment method, the placeOrder function submits the information to the capture function in the Model file of the module. If an error happens there, is there a way to return that error to the checkout page and not have it proceed to the submitted page? And if so, can the error be displayed using javascript functions?