Command errors are returned when the command cannot provide results because of a problem on the user-end (i.e. Bad command name, MEntity not found etc.).
nitc :: CmdError :: _http_status_code
nitc :: CmdError :: defaultinit
nitc :: commands_http $ CmdError :: http_status_code
HTTP code to return for this messagenitc :: commands_http $ CmdError :: http_status_code=
HTTP code to return for this messagenitc :: term $ CmdError :: print_message
nitc :: CmdError :: _http_status_code
nitc :: CmdMessage :: _http_status_code
HTTP code to return for this messagecore :: Object :: class_factory
Implementation used byget_class
to create the specific class.
nitc :: CmdMessage :: defaultinit
nitc :: CmdError :: 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.
core :: 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
# Command Error
#
# Command errors are returned when the command cannot provide results because
# of a problem on the user-end (i.e. Bad command name, MEntity not found etc.).
abstract class CmdError
super CmdMessage
end
src/doc/commands/commands_base.nit:96,1--102,3
redef class CmdError
redef var http_status_code = 400
end
src/doc/commands/commands_http.nit:87,1--89,3
redef class CmdError
redef fun to_md do return "**Error: {to_s}**"
end
src/doc/templates/md_commands.nit:38,1--40,3
redef class CmdError
redef fun to_html do return "<p class='text-danger'>Error: {to_s}</p>"
end
src/doc/templates/html_commands.nit:41,1--43,3