Closed wouterbeek closed 10 years ago
Make exceptions values for status easier to read. We already use the following code for this in the debug tools:
status
%! status_to_atom(+Term, -Atom) is det. status_to_atom(literal(type(XsdString,Status1)), Status2):- rdf_equal(xsd:string, XsdString), read_term_from_atom(Status1, StatusTerm, []), once(status_to_atom0(StatusTerm, Status2)), !. status_to_atom(Status, Status). status_to_atom0(exception(error(existence_error(directory,_),_)), existence_error_directory). status_to_atom0(exception(error(existence_error(source_sink,_),_)), existence_error_source_sink). status_to_atom0(exception(error(http_status(Status),_)), Label):- atomic_list_concat([http_status,Status], '_', Label). status_to_atom0(exception(error(instantiation_error(_),_)), instantiation_error). status_to_atom0(exception(error(io_error(Mode,_),_)), Label):- atomic_list_concat([io_error,Mode], '_', Label). status_to_atom0(exception(error(limit_exceeded(max_errors,_),_)), limit_exceeded_max_errors). status_to_atom0(exception(error(no_rdf(_))), no_rdf). status_to_atom0(exception(error(socket_error(_),_)), socket_error). status_to_atom0(exception(error(ssl_error(Kind),_)), Label):- atomic_list_concat([ssl_error,Kind], '_', Label). status_to_atom0(exception(error(timeout_error(Mode,_),_)), Label):- atomic_list_concat([timeout_error,Mode], '_', Label). status_to_atom0(exception(error(type_error(xml_dom,_),_)), type_error_xml_dom). status_to_atom0(false, false). status_to_atom0(true, true).
Some values are slightly useless:
true
false
Property names are quite misleading: message / status -> warning / exception
message
warning
exception
Purpose: simplify SPARQL query writing and SPARQL result set reading.
1
Make exceptions values for
status
easier to read. We already use the following code for this in the debug tools:2
Some values are slightly useless:
true
false
Sitll has value for debugging though.3
Property names are quite misleading:
message
/status
->warning
/exception
Purpose: simplify SPARQL query writing and SPARQL result set reading.