xmlrpc::fault (private)
xmlrpc::fault code msg
Defined in packages/xml-rpc/tcl/xml-rpc-procs.tcl
Format a fault response to an XML-RPC request
- Parameters:
- code (required)
- error code (integer)
- msg (required)
- error message
- Returns:
- XML-RPC fault message
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- xml_rpc_fault
Source code: # we could build this with the tDom commands, but it's quite a pain # and I don't see the benefit for our simple needs - vinodk set result "<?xml version=\"1.0\"?> <methodResponse> <fault> <value> <struct> <member> <name>faultCode</name> <value><i4>$code</i4></value> </member> <member> <name>faultString</name> <value><string>[ns_quotehtml $msg]</string></value> </member> </struct> </value> </fault> </methodResponse> " # now re-parse and then re-extract to make sure it's well formed set doc [xml_parse -persist $result] if { [catch {xml_doc_render $doc} result] } { return -code error "xmlrpc::fault XML is not well formed. error = $result" } xml_doc_free $doc return $resultXQL Not present: Generic, PostgreSQL, Oracle