mirror of
https://github.com/haraldh/chainerror.git
synced 2025-06-04 07:14:37 +02:00
add mdbook
This commit is contained in:
parent
e1570bc548
commit
88660684b7
28 changed files with 739 additions and 174 deletions
|
@ -1,11 +1,3 @@
|
|||
/*!
|
||||
|
||||
~~~bash
|
||||
$ cargo run -q --example tutorial1
|
||||
Error: StringError("func1 error")
|
||||
~~~
|
||||
|
||||
!*/
|
||||
|
||||
use std::error::Error;
|
||||
use std::result::Result;
|
||||
|
|
|
@ -1,21 +1,4 @@
|
|||
/*!
|
||||
|
||||
~~~bash
|
||||
$ cargo run -q --example tutorial10
|
||||
Main Error Report: func1 error calling func2
|
||||
Error reported by Func2Error: Error reading 'foo.txt'
|
||||
|
||||
Debug Error:
|
||||
examples/tutorial10.rs:49: Func2
|
||||
Caused by:
|
||||
examples/tutorial10.rs:29: Func2Error(Error reading 'foo.txt')
|
||||
Caused by:
|
||||
Kind(NotFound)
|
||||
~~~
|
||||
|
||||
!*/
|
||||
|
||||
use chainerror::prelude::*;
|
||||
use chainerror::*;
|
||||
use std::error::Error;
|
||||
use std::io;
|
||||
use std::result::Result;
|
||||
|
|
|
@ -1,21 +1,4 @@
|
|||
/*!
|
||||
|
||||
~~~bash
|
||||
$ cargo run -q --example tutorial11
|
||||
Main Error Report: func1 error calling func2
|
||||
Error reported by Func2Error: Error reading 'foo.txt'
|
||||
|
||||
Debug Error:
|
||||
examples/tutorial11.rs:57: func1 error calling func2
|
||||
Caused by:
|
||||
examples/tutorial11.rs:32: Func2Error(Error reading 'foo.txt')
|
||||
Caused by:
|
||||
Kind(NotFound)
|
||||
~~~
|
||||
|
||||
!*/
|
||||
|
||||
use chainerror::prelude::*;
|
||||
use chainerror::*;
|
||||
use std::error::Error;
|
||||
use std::io;
|
||||
use std::result::Result;
|
||||
|
|
|
@ -1,17 +1,4 @@
|
|||
/*!
|
||||
|
||||
~~~bash
|
||||
$ cargo run -q --example tutorial2
|
||||
Error: examples/tutorial2.rs:28: "func1 error"
|
||||
Caused by:
|
||||
examples/tutorial2.rs:21: "func2 error"
|
||||
Caused by:
|
||||
StringError("do_some_io error")
|
||||
~~~
|
||||
|
||||
!*/
|
||||
|
||||
use chainerror::prelude::*;
|
||||
use chainerror::*;
|
||||
use std::error::Error;
|
||||
use std::result::Result;
|
||||
|
||||
|
|
|
@ -1,17 +1,4 @@
|
|||
/*!
|
||||
|
||||
~~~bash
|
||||
$ cargo run -q --example tutorial3
|
||||
examples/tutorial3.rs:30: "func1 error"
|
||||
Caused by:
|
||||
examples/tutorial3.rs:25: "func2 error"
|
||||
Caused by:
|
||||
StringError("do_some_io error")
|
||||
~~~
|
||||
|
||||
!*/
|
||||
|
||||
use chainerror::prelude::*;
|
||||
use chainerror::*;
|
||||
use std::error::Error;
|
||||
use std::result::Result;
|
||||
|
||||
|
|
|
@ -1,17 +1,4 @@
|
|||
/*!
|
||||
|
||||
~~~bash
|
||||
$ cargo run -q --example tutorial4
|
||||
examples/tutorial4.rs:29: "func1 error"
|
||||
Caused by:
|
||||
examples/tutorial4.rs:24: "func2 error"
|
||||
Caused by:
|
||||
StringError("do_some_io error")
|
||||
~~~
|
||||
|
||||
!*/
|
||||
|
||||
use chainerror::prelude::*;
|
||||
use chainerror::*;
|
||||
use std::error::Error;
|
||||
use std::result::Result;
|
||||
|
||||
|
|
|
@ -1,14 +1,4 @@
|
|||
/*!
|
||||
|
||||
~~~bash
|
||||
$ cargo run -q --example tutorial5
|
||||
Func2 failed because of 'entity not found'
|
||||
func1 error
|
||||
~~~
|
||||
|
||||
!*/
|
||||
|
||||
use chainerror::prelude::*;
|
||||
use chainerror::*;
|
||||
use std::error::Error;
|
||||
use std::io;
|
||||
use std::result::Result;
|
||||
|
|
|
@ -1,16 +1,4 @@
|
|||
/*!
|
||||
|
||||
~~~bash
|
||||
$ cargo run -q --example tutorial6
|
||||
Error: func1 error
|
||||
caused by: Error reading 'foo.txt'
|
||||
caused by: std::io::Error: entity not found
|
||||
of kind: std::io::ErrorKind::NotFound
|
||||
~~~
|
||||
|
||||
!*/
|
||||
|
||||
use chainerror::prelude::*;
|
||||
use chainerror::*;
|
||||
use std::error::Error;
|
||||
use std::io;
|
||||
use std::result::Result;
|
||||
|
|
|
@ -1,18 +1,4 @@
|
|||
/*!
|
||||
|
||||
~~~bash
|
||||
$ cargo run -q --example tutorial7
|
||||
Error: func1 error
|
||||
caused by: std::io::Error: entity not found
|
||||
of kind: std::io::ErrorKind::NotFound
|
||||
The root cause was: std::io::Error: Kind(
|
||||
NotFound
|
||||
)
|
||||
~~~
|
||||
|
||||
!*/
|
||||
|
||||
use chainerror::prelude::*;
|
||||
use chainerror::*;
|
||||
use std::error::Error;
|
||||
use std::io;
|
||||
use std::result::Result;
|
||||
|
|
|
@ -1,18 +1,4 @@
|
|||
/*!
|
||||
|
||||
~~~bash
|
||||
$ cargo run -q --example tutorial8
|
||||
Func1Error: func1 error
|
||||
Func2Error: Error reading 'foo.txt'
|
||||
Debug Func2Error:
|
||||
examples/tutorial8.rs:27: Func2Error(Error reading 'foo.txt')
|
||||
Caused by:
|
||||
Kind(NotFound)
|
||||
~~~
|
||||
|
||||
!*/
|
||||
|
||||
use chainerror::prelude::*;
|
||||
use chainerror::*;
|
||||
use std::error::Error;
|
||||
use std::io;
|
||||
use std::result::Result;
|
||||
|
|
|
@ -1,18 +1,4 @@
|
|||
/*!
|
||||
|
||||
~~~bash
|
||||
$ cargo run -q --example tutorial9
|
||||
Func1ErrorFunc2:
|
||||
examples/tutorial9.rs:37: Func1ErrorFunc2(func1 error calling func2)
|
||||
Caused by:
|
||||
examples/tutorial9.rs:29: Func2Error(Error reading 'foo.txt')
|
||||
Caused by:
|
||||
Kind(NotFound)
|
||||
~~~
|
||||
|
||||
!*/
|
||||
|
||||
use chainerror::prelude::*;
|
||||
use chainerror::*;
|
||||
use std::error::Error;
|
||||
use std::io;
|
||||
use std::result::Result;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue