flight-planner
Version:
Plan and route VFR flights
43 lines (42 loc) • 1.52 kB
TypeScript
/**
* Base class for all flight planner exceptions.
*/
export declare abstract class FlightPlannerError extends Error {
readonly code: string;
constructor(message: string, code: string);
}
/**
* Exception thrown when insufficient waypoints are provided for route planning.
* A valid route requires at least a departure and arrival waypoint.
*/
export declare class InsufficientWaypointsError extends FlightPlannerError {
constructor(providedCount?: number);
}
/**
* Exception thrown when route parsing fails.
*/
export declare class RouteParsingError extends FlightPlannerError {
readonly routeString?: string | undefined;
constructor(message: string, routeString?: string | undefined);
}
/**
* Exception thrown when aircraft data is invalid or missing.
*/
export declare class AircraftDataError extends FlightPlannerError {
readonly aircraftRegistration?: string | undefined;
constructor(message: string, aircraftRegistration?: string | undefined);
}
/**
* Exception thrown when waypoint data is invalid or missing.
*/
export declare class WaypointDataError extends FlightPlannerError {
readonly waypointIdentifier?: string | undefined;
constructor(message: string, waypointIdentifier?: string | undefined);
}
/**
* Exception thrown when weather data cannot be retrieved or is invalid.
*/
export declare class WeatherDataError extends FlightPlannerError {
readonly location?: string | undefined;
constructor(message: string, location?: string | undefined);
}