1
1
import { ApplicationError } from '@theia/core' ;
2
- import URI from '@theia/core/lib/common/uri' ;
3
- import {
4
- Location ,
5
- Range ,
6
- } from '@theia/core/shared/vscode-languageserver-protocol' ;
2
+ import { Location } from '@theia/core/shared/vscode-languageserver-protocol' ;
7
3
import { BoardUserField } from '.' ;
8
4
import { Board , Port } from '../../common/protocol/boards-service' ;
9
5
import { ErrorInfo as CliErrorInfo } from '../../node/cli-error-parser' ;
@@ -28,31 +24,6 @@ export namespace CoreError {
28
24
const { message, location } = error ;
29
25
return ! ! message && ! ! location ;
30
26
}
31
- export function toString ( { location, message } : Compiler ) : string {
32
- const {
33
- uri,
34
- range : {
35
- start : { line, character } ,
36
- } ,
37
- } = location ;
38
- return `${ new URI ( uri )
39
- . withFragment ( `L${ line } ,${ character } ` )
40
- . toString ( ) } => '${ message } '`;
41
- }
42
- export function sameAs ( left : Compiler , right : Compiler ) : boolean {
43
- const sameRange = ( left : Range , right : Range ) =>
44
- left . start . line === right . start . line &&
45
- left . start . character === right . start . character &&
46
- left . end . line === right . end . line &&
47
- left . end . character === right . end . character ;
48
- const sameLocation = ( left : Location , right : Location ) =>
49
- left . uri === right . uri && sameRange ( left . range , right . range ) ;
50
- return (
51
- left . message === right . message &&
52
- left . details === right . details &&
53
- sameLocation ( left . location , right . location )
54
- ) ;
55
- }
56
27
}
57
28
export const Codes = {
58
29
Verify : 4001 ,
0 commit comments