Skip to main content

display_chain

Function display_chain 

pub fn display_chain(error: &dyn Error) -> String
Expand description

Renders an error’s text followed by the text of each cause in its source() chain, separated by : .

A cause is skipped when its text already appears in the text rendered so far. Some error variants copy their source’s text into their own message, and the Engine’s LuaRuntime variant is one example. Appending such a cause again would print its text twice. The check is a plain substring test.