CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/lib/metasploit/framework/login_scanner/invalid.rb
Views: 1904
1
module Metasploit
2
module Framework
3
module LoginScanner
4
5
# This class is the generic Exception raised by LoginScanners when
6
# they fail validation. It rolls up all validation errors into a
7
# single exception so that all errors can be dealt with at once.
8
class Invalid < StandardError
9
10
attr_reader :model
11
12
def initialize(model)
13
@model = model
14
15
errors = @model.errors.full_messages.join(', ')
16
errors << " (#{model.class.to_s})"
17
super(errors)
18
end
19
end
20
21
end
22
end
23
end
24
25