Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@ members = [
"lambda-runtime-client",
"lambda-runtime-core",
"lambda-runtime",
"lambda-http"
"lambda-http",
"lambda-runtime-errors",
"lambda-runtime-errors-derive"
]
2 changes: 1 addition & 1 deletion lambda-runtime-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ keywords = ["AWS", "Lambda", "Runtime", "Rust"]
license = "Apache-2.0"
homepage = "https://github.com/awslabs/aws-lambda-rust-runtime"
repository = "https://github.com/awslabs/aws-lambda-rust-runtime"
documentation = "https://docs.rs/lambda_runtime"
documentation = "https://docs.rs/lambda_runtime_core"
edition = "2018"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion lambda-runtime-errors-derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ keywords = ["AWS", "Lambda", "Runtime", "Rust"]
license = "Apache-2.0"
homepage = "https://github.com/awslabs/aws-lambda-rust-runtime"
repository = "https://github.com/awslabs/aws-lambda-rust-runtime"
documentation = "https://docs.rs/lambda_runtime"
documentation = "https://docs.rs/lambda_runtime_errors_derive"

[dependencies]
syn = "^0.15"
Expand Down
3 changes: 2 additions & 1 deletion lambda-runtime-errors/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ keywords = ["AWS", "Lambda", "Runtime", "Rust"]
license = "Apache-2.0"
homepage = "https://github.com/awslabs/aws-lambda-rust-runtime"
repository = "https://github.com/awslabs/aws-lambda-rust-runtime"
documentation = "https://docs.rs/lambda_runtime"
documentation = "https://docs.rs/lambda_runtime_errors"

[dependencies]
log = "^0.4"
failure = "^0.1"
serde_json = "^1"
lambda_runtime_errors_derive = { path = "../lambda-runtime-errors-derive", version = "^0.1" }

[dev-dependencies]
lambda_runtime_core = { path = "../lambda-runtime-core", version = "^0.1"}
12 changes: 12 additions & 0 deletions lambda-runtime-errors/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
//! The Lambda runtime errors crate defines the `LambdaErrorExt` trait
//! that can be used by libriaries to return errors compatible with the
//! AWS Lambda Rust runtime.
//!
//! This crate also exports the `lambda_runtime_errors_derive` crate to
//! derive the `LambdaErrorExt` trait.
//!
//! ```rust,no-run
//! use lambda_runtime_errors::*;
//!
//! // the generated error_type() method returns "crate::LambdaError"
//! #[derive(LambdaErrorExt)]
//! struct LambdaError;
//! ```
mod error_ext_impl;

pub use crate::error_ext_impl::*;
pub use lambda_runtime_errors_derive::*;

use failure::{format_err, Compat, Error, Fail};
use std::fmt;
Expand Down