Skip to content

Commit

Permalink
2024/10/28-17:56:37 (Linux VDI0092.zit.bam.de x86_64)
Browse files Browse the repository at this point in the history
  • Loading branch information
pbenner committed Oct 28, 2024
1 parent d797171 commit 2985baa
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/granges_error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,23 @@ use std::fmt;
/* Generic error types
* -------------------------------------------------------------------------- */

/// A custom error type representing a missing column in the `GRanges` or `Meta` object.
///
/// `MissingColumn` is used to indicate when a required column is not found within a `GRanges`
/// or `Meta` object, allowing for more informative error handling and debugging.
///
/// # Fields
///
/// - `0`: A `String` that holds the name of the missing column.
///
/// # Example
///
/// ```rust
/// use rustynetics::granges_error::MissingColumn;
///
/// let missing_column = MissingColumn(String::from("gene_id"));
/// println!("{}", missing_column); // Outputs: "GRanges/Meta object is missing a column named `gene_id`"
/// ```
#[derive(Debug)]
pub struct MissingColumn(pub String);

Expand Down

0 comments on commit 2985baa

Please sign in to comment.