MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / to_string_with_causes

Method to_string_with_causes

src/ore/src/error.rs:55–57  ·  view source on GitHub ↗

Converts `self` to a string `String`, along with the chain of _source_ errors or causes, if there are any. # Examples Basic usage: ``` use anyhow::anyhow; use mz_ore::error::ErrorExt; let error = anyhow!("inner"); let error = error.context("context"); assert_eq!(error.to_string_with_causes(), "context: inner"); ```

(&self)

Source from the content-addressed store, hash-verified

53 /// assert_eq!(error.to_string_with_causes(), "context: inner");
54 /// ```
55 fn to_string_with_causes(&self) -> String {
56 format!("{}", self.display_with_causes())
57 }
58}
59
60impl<E: Error + ?Sized> ErrorExt for E {}

Callers 15

render_upload_operatorFunction · 0.80
fromMethod · 0.80
detailMethod · 0.80
offset_into_valueFunction · 0.80
fmt_raw_syntaxMethod · 0.80
detailMethod · 0.80
parse_bytesFunction · 0.80
resolve_broker_addrMethod · 0.80
decimalMethod · 0.80

Implementers 1

error.rssrc/ore/src/error.rs

Calls

no outgoing calls

Tested by 3

test_github_25388Function · 0.64
test_many_columnsFunction · 0.64