URCap Error Handling

Is there any way for a URCap to display a popup with multiple buttons in response to an error on the robot? For example, if the robot detects an emergency stop or a collision, could I stop the program and display a popup with the option to either continue or end?