# How do I use Check with Table to skip results that contain error messages

I want to run an iteration where at each step I check whether I obtain an error message, and if I do, I want to not store that result and move on to the next iteration instead. Here's an example of how it's working using a Do Loop:

Do[Quiet[If[Check[i^0, error] == error, Continue[]]]; Print[i], {i, {1, 0, 2, 0, 1}}];
1
2
1


Now, I would like to do something similar using Table instead, and I was thinking of doing something like this:

Table[If[Check[i^0, err] == err, Nothing, i], {i, {1, 0, 2, 0, 1}}]


but this does not work. The output I get is:

{If[1 == err, Nothing, i], If[1 == err, Nothing, i], If[1 == err, Nothing, i]}


If I try doing something that does not involve the function Check, like this:

Table[If[i == 2, Nothing, i], {i, 1, 6}]
{1, 3, 4, 5, 6}


that does work. Is there a way to make Table work with Check in it?

Use ===
data = Table[If[Check[i^0, err] === err, Nothing, i], {i, {1, 0, 2, 0, 1}}]

You should have used === in your Do loop also. But there because of Continue you did not notice as it was starting new loop each time.
data = Table[z = Quiet@Check[i^0, err];