Parse to a meaningful format in the nix output stream before hitting the running build.

This commit is contained in:
Tom Alexander
2026-02-19 18:39:01 -05:00
parent f797a19175
commit 8d2dd015c4
8 changed files with 1028 additions and 309 deletions

View File

@@ -1,3 +1,5 @@
use std::fmt::Display;
use std::num::TryFromIntError;
use std::str::Utf8Error;
use std::string::FromUtf8Error;
@@ -16,6 +18,13 @@ pub(crate) enum CustomError {
UrlParseError(#[allow(dead_code)] url::ParseError),
Migrate(#[allow(dead_code)] sqlx::migrate::MigrateError),
Sql(#[allow(dead_code)] sqlx::Error),
TryFromIntError(#[allow(dead_code)] TryFromIntError),
}
impl Display for CustomError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{:?}", self)
}
}
impl From<std::io::Error> for CustomError {
@@ -95,3 +104,9 @@ impl From<sqlx::Error> for CustomError {
CustomError::Sql(value)
}
}
impl From<TryFromIntError> for CustomError {
fn from(value: TryFromIntError) -> Self {
CustomError::TryFromIntError(value)
}
}