Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lang: fix error mod exports #1426

Merged
merged 5 commits into from
Feb 10, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix errorcodeoffset import
  • Loading branch information
paul-schaaf committed Feb 10, 2022
commit 5f635c713cc6c9797b7540287d5145b8934a5802
5 changes: 4 additions & 1 deletion lang/src/error.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
use crate::error;

/// The starting point for user defined error codes.
pub const ERROR_CODE_OFFSET: u32 = 6000;

/// Error codes that can be returned by internal framework code.
///
/// - >= 100 Instruction error codes
Expand All @@ -10,7 +13,7 @@ use crate::error;
/// - = 5000 deprecated error code
///
/// The starting point for user-defined errors is defined
/// by the [ERROR_CODE_OFFSET](crate::__private::ERROR_CODE_OFFSET).
/// by the [ERROR_CODE_OFFSET](crate::error::ERROR_CODE_OFFSET).
#[error(offset = 0)]
pub enum ErrorCode {
// Instructions
Expand Down
2 changes: 0 additions & 2 deletions lang/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ pub mod context;
mod ctor;

armaniferrante marked this conversation as resolved.
Show resolved Hide resolved
pub mod error;
/// The starting point for user defined error codes.
pub const ERROR_CODE_OFFSET: u32 = 6000;

armaniferrante marked this conversation as resolved.
Show resolved Hide resolved
#[doc(hidden)]
pub mod idl;
Expand Down