Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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.

Check and Quiet

share|improve this question
    
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 Jordan Jan 30 at 9:57
1  
Related: (29085), (29086) –  Mr.Wizard Jan 30 at 9:59
    
@LaraJordan So please create a minimal working example. –  Kuba Jan 30 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 Jordan Jan 30 at 10:13
    
You're welcome. I wish I had more to offer. –  Mr.Wizard Jan 31 at 5:29
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.