1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-21 04:52:26 -05:00

align error message

- https://github.com/denoland/deno/pull/25517#issuecomment-2505095797
This commit is contained in:
Hajime-san 2024-11-28 11:43:27 +09:00
parent 7039401fbe
commit 4cca9ae370
2 changed files with 5 additions and 5 deletions

View file

@ -230,7 +230,7 @@ function createImageBitmap(
new DOMException(
`${prefix}: The provided value for 'image' is not of type '(${
ArrayPrototypeJoin(imageBitmapSources, " or ")
})'.`,
})'`,
"InvalidStateError",
),
);
@ -267,14 +267,14 @@ function createImageBitmap(
} else if (mimeTypeString === "") {
return PromiseReject(
new DOMException(
`The MIME type of source image is not specified.`,
`The MIME type of source image is not specified`,
"InvalidStateError",
),
);
} else {
return PromiseReject(
new DOMException(
`The MIME type ${mimeTypeString} of source image is not a supported format.`,
`The MIME type ${mimeTypeString} of source image is not a supported format`,
"InvalidStateError",
),
);

View file

@ -21,10 +21,10 @@ pub enum CanvasError {
#[error("Cannot decode image '{0}'")]
InvalidImage(image::ImageError),
/// This error will be mapped to DOMExceptionInvalidStateError.
#[error("The chunk data is not big enough with the specified width: {0} and height: {1}.")]
#[error("The chunk data is not big enough with the specified width: {0} and height: {1}")]
NotBigEnoughChunk(u32, u32),
/// This error will be mapped to DOMExceptionInvalidStateError.
#[error("The width: {0} or height: {1} could not be zero.")]
#[error("The width: {0} or height: {1} could not be zero")]
InvalidSizeZero(u32, u32),
/// This error will be mapped to TypeError.
#[error(transparent)]