cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

This product reached the end of support date on March 31, 2021.

Can a RegEx be used to exclude Exceptions?

jared_kemp
Organizer

I have some exceptions that I have discussed with our team about excluding that are purely used for auditing purposes. Is it possible to use a RegEx in the exclude exceptions fields? such as one that excludes anything that only contains a numbers with no a-z or special characters? I also have another that states "begin Sep....." with more words but the start is always the month, do I need to create an exclusion for each month?

In the long run I have asked our developers to review their logging practices as well as why these are throwing exceptions but it may be awhile before they can clean this up.

7 REPLIES 7

You can add, remove (won't recommend it) or modify exception rule in System profile -> Settings -> Error Detection.

You can apply regex for throwing classes.

I don't want a regex for the throwing class, but for the exception message itself. I have the below exception class that I want to exclude when the message is only numbers with no other characters besides numbers 0-9, such as 765512 or 32266554. Should the below work? I know that expression should return numbers only but I am not sure how to properly format it in the window.

I wouldn't expect this to work. Whenever a regex can be entered, there will be a match operator called "regex". Other match operators like "equals", "starts", "contains" perform string matching but no regex evaluation.

As of 6.2, in the dialog shown above, the regex match operator is not available.

Yes, it is not working as I figured would happen. Sadly the devs are ways away from cleaning up the cause of creating these exceptions and the class itself returns legitimate errors and needs to be kept. I am just trying to do a bandaid for my own sake as the entries make it much more difficult to find useful information.

Your Regex is fine but you should select Regex for that. Can you try out similar experiment with other exceptions in the system?

There is no option for regex in this section so I figured it would not work, which it is not.

vmishra2
Participant

We are also doing the same for the exceptions as there is nothing to filter at dashlet level.