Wrapped Edit and Delete in try catch blocks
Added error message display