Mo Better Exception Handling
A little more cleanup of Instiki's exception handling. Add some tests.
This commit is contained in:
parent
bceb1864df
commit
daa12e575d
2 changed files with 12 additions and 3 deletions
|
@ -429,7 +429,7 @@ class WikiController < ApplicationController
|
|||
def filter_spam(content)
|
||||
@@spam_patterns ||= load_spam_patterns
|
||||
@@spam_patterns.each do |pattern|
|
||||
raise "Your edit was blocked by spam filtering" if content =~ pattern
|
||||
raise Instiki::ValidationError.new("Your edit was blocked by spam filtering") if content =~ pattern
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue