mentity_name
nitc :: ErrorMEntityConflict :: _conflicts
Conflicts formentity_name
nitc :: ErrorMEntityConflict :: _mentity_name
MEntity name providednitc :: ErrorMEntityConflict :: conflicts=
Conflicts formentity_name
nitc :: ErrorMEntityConflict :: mentity_name=
MEntity name providednitc $ ErrorMEntityConflict :: SELF
Type of this instance, automatically specialized in every classnitc :: commands_http $ ErrorMEntityConflict :: http_status_code
HTTP code to return for this messagenitc :: commands_http $ ErrorMEntityConflict :: http_status_code=
HTTP code to return for this messagenitc :: term $ ErrorMEntityConflict :: print_message
nitc :: ErrorMEntityConflict :: _conflicts
Conflicts formentity_name
nitc :: CmdMessage :: _http_status_code
HTTP code to return for this messagenitc :: CmdError :: _http_status_code
nitc :: ErrorMEntityConflict :: _mentity_name
MEntity name providedcore :: Object :: class_factory
Implementation used byget_class
to create the specific class.
nitc :: ErrorMEntityConflict :: conflicts=
Conflicts formentity_name
nitc :: CmdError :: defaultinit
nitc :: CmdMessage :: defaultinit
core :: Object :: defaultinit
nitc :: CmdMessage :: http_status_code
HTTP code to return for this messagenitc :: CmdMessage :: http_status_code=
HTTP code to return for this messagecore :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
nitc :: ErrorMEntityConflict :: mentity_name=
MEntity name providedcore :: Object :: native_class_name
The class name of the object in CString format.core :: Object :: output_class_name
Display class name on stdout (debug only).nitc :: CmdMessage :: print_message
nitc :: CmdMessage :: to_json
Return a JSON Serializable representation ofself
# Multiple MEntities matching `mentity_name`
class ErrorMEntityConflict
super CmdError
# MEntity name provided
var mentity_name: String
# Conflicts for `mentity_name`
var conflicts: Array[MEntity]
redef fun to_s do
var res = new Buffer
res.append "Multiple entities for `{mentity_name}`:"
for mentity in conflicts do
res.append " `{mentity.full_name}`"
if mentity != conflicts.last then res.append ","
end
return res.write_to_string
end
end
src/doc/commands/commands_base.nit:196,1--215,3
redef class ErrorMEntityConflict
redef var http_status_code = 300
end
src/doc/commands/commands_http.nit:103,1--105,3
redef class ErrorMEntityConflict
redef fun print_message(no_color) do
if no_color == null or not no_color then
print "Multiple results found for `{mentity_name.blue}`...".bold
else
print "Multiple results found for `{mentity_name}`..."
end
print ""
if conflicts.not_empty then
print "Did you mean?"
print ""
for s in conflicts do
print s.cs_list_item(no_color)
print ""
end
end
end
end
src/doc/term/term.nit:89,1--106,3