File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed
arduino-ide-extension/src/common/protocol Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -73,12 +73,12 @@ export namespace CoreError {
7373 UploadUsingProgrammer : 4003 ,
7474 BurnBootloader : 4004 ,
7575 } ;
76- export const VerifyFailed = create ( Codes . Verify ) ;
77- export const UploadFailed = create ( Codes . Upload ) ;
78- export const UploadUsingProgrammerFailed = create (
76+ export const VerifyFailed = declareCoreError ( Codes . Verify ) ;
77+ export const UploadFailed = declareCoreError ( Codes . Upload ) ;
78+ export const UploadUsingProgrammerFailed = declareCoreError (
7979 Codes . UploadUsingProgrammer
8080 ) ;
81- export const BurnBootloaderFailed = create ( Codes . BurnBootloader ) ;
81+ export const BurnBootloaderFailed = declareCoreError ( Codes . BurnBootloader ) ;
8282 export function is (
8383 error : unknown
8484 ) : error is ApplicationError < number , ErrorLocation [ ] > {
@@ -88,7 +88,7 @@ export namespace CoreError {
8888 Object . values ( Codes ) . includes ( error . code )
8989 ) ;
9090 }
91- function create (
91+ function declareCoreError (
9292 code : number
9393 ) : ApplicationError . Constructor < number , ErrorLocation [ ] > {
9494 return ApplicationError . declare (
Original file line number Diff line number Diff line change @@ -79,16 +79,16 @@ export const MonitorErrorCodes = {
7979 MissingConfiguration : 6004 ,
8080} as const ;
8181
82- export const ConnectionFailedError = createMonitorError (
82+ export const ConnectionFailedError = declareMonitorError (
8383 MonitorErrorCodes . ConnectionFailed
8484) ;
85- export const NotConnectedError = createMonitorError (
85+ export const NotConnectedError = declareMonitorError (
8686 MonitorErrorCodes . NotConnected
8787) ;
88- export const AlreadyConnectedError = createMonitorError (
88+ export const AlreadyConnectedError = declareMonitorError (
8989 MonitorErrorCodes . AlreadyConnected
9090) ;
91- export const MissingConfigurationError = createMonitorError (
91+ export const MissingConfigurationError = declareMonitorError (
9292 MonitorErrorCodes . MissingConfiguration
9393) ;
9494
@@ -167,7 +167,7 @@ interface PortDescriptor {
167167 readonly protocol : string ;
168168 readonly address : string ;
169169}
170- function createMonitorError (
170+ function declareMonitorError (
171171 code : number
172172) : ApplicationError . Constructor < number , PortDescriptor > {
173173 return ApplicationError . declare (
You can’t perform that action at this time.
0 commit comments