# Is there a function similar to SQL's Iserror? [duplicate]

I have an output which I want to hide if there is an error otherwise display it. The output is a Dynamic[output] so I can't simply use something like

If[IntegerQ[output],output,""]


or

If[Head[output]==Integer,output,""]


becasue it seems that although this method would work for other items such as integers, text and so on, a dynamic object stays a dynamic object whether there is an error or not. What I am looking for is something that does the following

If there is an error occuring when I display this dynamic object, display nothing otherwise display the dynamic object.


I have tried the Check and Quiet functions together and what I get is below. I don't care about the typed error messages but I'm talking about the output cells that look like red blocks with writing inside of them. I hope this explains things better. I have put a picture instead of code becasue there are a lot of background definitions for all the things in the grid that would be too long to put here.

• There is a whole lot of code defining all this stuff. I posted the picture so you could see the results without having to look at all the background code. – lara Jan 30 '14 at 9:57
• Related: (29085), (29086) – Mr.Wizard Jan 30 '14 at 9:59
• @LaraJordan So please create a minimal working example. – Kuba Jan 30 '14 at 10:01
• Thanks Mr. Wizard. It is definately a case of one of these 'front end' error messages so likely nothing normal to supress kernel error messages will work. – lara Jan 30 '14 at 10:13
• You're welcome. I wish I had more to offer. – Mr.Wizard Jan 31 '14 at 5:29