Last active
August 6, 2017 14:49
-
-
Save vgerbase/e7d31dfbf51e174d0d65 to your computer and use it in GitHub Desktop.
Elmah Error Filter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- EN-US --> | |
<errorFilter> | |
<test> | |
<or> | |
<equal binding="HttpStatusCode" value="404" type="Int32" /> | |
<regex binding="Context.Request.ServerVariables['URL']" pattern="/favicon\.ico(\z|\?)" /> | |
</or> | |
<or> | |
<and> | |
<!-- O arquivo '/[^']+' não existe --> | |
<regex binding="BaseException.Message" pattern="The file '/[^']+' does not exist" /> | |
<regex binding="FilterSourceType.Name" pattern="mail" /> | |
</and> | |
<and> | |
<!-- O controlador do caminho '/[^']+' não foi encontrado ou não implementa IController. --> | |
<regex binding="Exception" type="System.Web.HttpException" pattern="The controller for path '/[^']+' was not found or does not implement IController." /> | |
<regex binding="FilterSourceType.Name" pattern="mail" /> | |
</and> | |
</or> | |
</test> | |
</errorFilter> | |
<!-- PT-BR --> | |
<errorFilter> | |
<test> | |
<or> | |
<equal binding="HttpStatusCode" value="404" type="Int32" /> | |
<regex binding="Context.Request.ServerVariables['URL']" pattern="/favicon\.ico(\z|\?)" /> | |
</or> | |
<or> | |
<and> | |
<!-- The file '/[^']+' does not exist --> | |
<regex binding="BaseException.Message" pattern="O arquivo '/[^']+' não existe" /> | |
<regex binding="FilterSourceType.Name" pattern="mail" /> | |
</and> | |
<and> | |
<!-- The controller for path '/[^']+' was not found or does not implement IController. --> | |
<regex binding="Exception" type="System.Web.HttpException" pattern="O controlador do caminho '/[^']+' não foi encontrado ou não implementa IController." /> | |
<regex binding="FilterSourceType.Name" pattern="mail" /> | |
</and> | |
</or> | |
</test> | |
</errorFilter> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment