mentity_name
nitc :: ErrorMEntityNotFound :: _mentity_name
MEntity name providednitc :: ErrorMEntityNotFound :: _suggestions
Suggestions matching thementity_name
.
nitc :: ErrorMEntityNotFound :: mentity_name=
MEntity name providednitc :: ErrorMEntityNotFound :: suggestions
Suggestions matching thementity_name
.
nitc :: ErrorMEntityNotFound :: suggestions=
Suggestions matching thementity_name
.
nitc $ ErrorMEntityNotFound :: SELF
Type of this instance, automatically specialized in every classnitc :: commands_http $ ErrorMEntityNotFound :: http_status_code
HTTP code to return for this messagenitc :: commands_http $ ErrorMEntityNotFound :: http_status_code=
HTTP code to return for this messagenitc :: term $ ErrorMEntityNotFound :: print_message
nitc :: CmdMessage :: _http_status_code
HTTP code to return for this messagenitc :: CmdError :: _http_status_code
nitc :: ErrorMEntityNotFound :: _mentity_name
MEntity name providednitc :: ErrorMEntityNotFound :: _suggestions
Suggestions matching thementity_name
.
core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
nitc :: CmdError :: defaultinit
core :: Object :: defaultinit
nitc :: CmdMessage :: 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 :: ErrorMEntityNotFound :: 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 :: ErrorMEntityNotFound :: suggestions
Suggestions matching thementity_name
.
nitc :: ErrorMEntityNotFound :: suggestions=
Suggestions matching thementity_name
.
nitc :: CmdMessage :: to_json
Return a JSON Serializable representation ofself
# No MEntity matching `mentity_name`
class ErrorMEntityNotFound
super CmdError
# MEntity name provided
var mentity_name: String
# Suggestions matching the `mentity_name`.
var suggestions: Array[MEntity]
redef fun to_s do
var res = new Buffer
res.append "No entity for `{mentity_name}`.\n"
res.append "Did you mean: "
for mentity in suggestions do
res.append " `{mentity.full_name}`"
if mentity != suggestions.last then res.append ","
end
return res.write_to_string
end
end
src/doc/commands/commands_base.nit:174,1--194,3
redef class ErrorMEntityNotFound
redef var http_status_code = 404
end
src/doc/commands/commands_http.nit:99,1--101,3
redef class ErrorMEntityNotFound
redef fun print_message(no_color) do
if no_color == null or not no_color then
print "No result found for `{mentity_name.blue}`...".bold
else
print "No result found for `{mentity_name}`..."
end
print ""
if suggestions.not_empty then
print "Did you mean?"
print ""
for s in suggestions do
print s.cs_list_item(no_color)
print ""
end
end
end
end
src/doc/term/term.nit:70,1--87,3