Exception: PgVerify::Core::Error
- Inherits:
-
StandardError
- Object
- StandardError
- PgVerify::Core::Error
show all
- Defined in:
- lib/pg-verify/core/core.rb
Direct Known Subclasses
CMDRunner::CMDRunnerError, Doctor::DoctorError, Interpret::InterpretError, Interpret::InvalidDSL_expression, Interpret::InvalidDSL_graph, Interpret::InvalidDSL_model, Interpret::InvalidDSL_state, Interpret::InvalidDSL_transition, Interpret::InvalidDSL_var, Interpret::NoSuchScriptError, Interpret::NoSuchStateError, Model::Validation::AssignmentToStateVariableError, Model::Validation::DeadlockInFSMError, Model::Validation::EmptyStateSetError, Model::Validation::ForeignVariableAssignmentError, Model::Validation::UnknownTokenError, Model::Validation::UnknownVariableError, Model::Validation::ValidationError, NoDefaultFileError, NoSuchFileError, NuSMV::RawNuSMVError
Instance Method Summary
collapse
Instance Method Details
7
8
9
|
# File 'lib/pg-verify/core/core.rb', line 7
def formatted()
raise "Not implemented in subclass #{self.class}"
end
|
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/pg-verify/core/core.rb', line 11
def to_formatted()
title, body, hint = self.formatted()
message = []
error_label = " ✖ ERROR ".bg_error
message << "#{error_label} #{title.c_error}" unless title.nil?
indent = " ".bg_error + " "
message << "#{indent}\n#{body.indented(str: indent)}\n#{indent}" unless body.nil?
indent = " ".bg_warn + " "
message << backtrace.map.map {|l| "#{indent}#{l.c_warn}"}.join("\n") if Settings.full_stack_trace
indent = " ".bg_sidenote + " "
message << hint.split("\n").map {|l| "#{indent}#{l.c_sidenote}"}.join("\n") unless hint.nil?
return message.join("\n")
end
|