28 lines
879 B
TypeScript
28 lines
879 B
TypeScript
/** A patch cannot be applied, so nothing was written. */
|
|
export class PatchError extends Error {
|
|
override name = 'PatchError';
|
|
}
|
|
|
|
/** A patch definition on disk is malformed. */
|
|
export class DefinitionError extends PatchError {
|
|
override name = 'DefinitionError';
|
|
}
|
|
|
|
/**
|
|
* A patch site could not be found, or was found in more than one place. The caller reports
|
|
* which patches and features are affected; it never falls back to a guessed address.
|
|
*/
|
|
export class LocateError extends PatchError {
|
|
override name = 'LocateError';
|
|
}
|
|
|
|
/** The bytes at a located site are not what the definition expects: a different game build, or already patched. */
|
|
export class VerifyError extends PatchError {
|
|
override name = 'VerifyError';
|
|
}
|
|
|
|
/** The file is not a PE executable this code understands. */
|
|
export class PeFormatError extends Error {
|
|
override name = 'PeFormatError';
|
|
}
|