MCPcopy Create free account
hub / github.com/daisy/MathCAT / errors_to_string

Function errors_to_string

src/interface.rs:343–355  ·  view source on GitHub ↗

Convert the returned error from set_mathml, etc., to a useful string for display

(e:&Error)

Source from the content-addressed store, hash-verified

341
342/// Convert the returned error from set_mathml, etc., to a useful string for display
343pub fn errors_to_string(e:&Error) -> String {
344 let mut result = String::default();
345 let mut first_time = true;
346 for e in e.iter() {
347 if first_time {
348 result = format!("{}\n", e);
349 first_time = false;
350 } else {
351 result += &format!("caused by: {}\n", e);
352 }
353 }
354 return result;
355}
356
357
358fn add_ids(mathml: Element) -> Element {

Callers 2

newMethod · 0.85
initializeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected