/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
import{replace as e}from"../../../core/string.js";const t={Cancelled:"Cancelled",InvalidStatResponse:"Invalid statistics response from service",InvalidRequest:"Invalid request",RequestFailed:"Request failed - {reason}",MissingFeatures:"Missing features",AggregationFieldNotFound:"Aggregation field not found",DataElementsNotFound:"Data elements not found on service",NeverReach:"Encountered unreachable logic",NotImplemented:"Not implemented"};class r extends Error{constructor(s,a){super(e(t[s],a)),this.declaredRootClass="esri.arcade.featureset.support.featureseterror",Error.captureStackTrace&&Error.captureStackTrace(this,r)}}function s(e){if(null!=e&&e?.aborted)throw new r("Cancelled")}export{r as FeatureSetError,t as featureSetErrorMessages,s as throwIfCancelled};
