Ignore errors pattern

Hi there,

I am experiencing a behaviour that it it pretty much irritating. My application produces some errors that should be ignored, but the error message has a number that for each event is different. Is there any way to write down a pattern to ignore these errors?

Thanks in advance