I having written an error handling function that displays a Modal when some error(Catch) occurs. The following is its implementation:
function displayErrorMod