jeffersonfparil / poolgen

Quantitative and population genetics analyses of populations, pools, half-sib/full-sib families, and polyploids
GNU General Public License v3.0
3 stars 0 forks source link

Improve error handling by defining an error type #16

Open jeffersonfparil opened 5 months ago

jeffersonfparil commented 5 months ago

See epistasisfeatures for an example:

jeffersonfparil commented 3 months ago

Oh sorry the repo's private. Here's my definition there:

#[derive(Debug, Clone)]
pub struct EpiFeatError {
    pub code: usize,
    pub message: String,
}

impl fmt::Display for EpiFeatError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "Code: {}; Message: {}", self.code, self.message)
    }
}

Jefferson F. Paril

T: +61 452 021 156

*E: @. @.> W: https://jeffersonfparil.github.io/https://jeffersonfparil.github.io/

On Fri, Jun 28, 2024 at 3:49 PM Cj Jiang @.***> wrote:

The links are broken, do you have another example?

— Reply to this email directly, view it on GitHub https://github.com/jeffersonfparil/poolgen/issues/16#issuecomment-2196188744, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANE7YHLGSWK5QB7WWGOW3ALZJT2OHAVCNFSM6AAAAABKBGCTTWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJWGE4DQNZUGQ . You are receiving this because you authored the thread.Message ID: @.***>