Skip to content

Commit 2ed20bf

Browse files
committed
eslint and prettier
1 parent 16804b5 commit 2ed20bf

File tree

2 files changed

+17
-19
lines changed

2 files changed

+17
-19
lines changed

src/phpDebug.ts

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1547,7 +1547,7 @@ class PhpDebugSession extends vscode.DebugSession {
15471547
let ex: VSCodeDebugProtocol.ExceptionDetails | undefined
15481548

15491549
if (connection.featureSet('virtual_exception_value')) {
1550-
let old_max_depth: number = 3
1550+
let old_max_depth = 3
15511551
try {
15521552
const { stack } = await connection.sendStackGetCommand() // CACHE?
15531553

@@ -1556,35 +1556,33 @@ class PhpDebugSession extends vscode.DebugSession {
15561556
old_max_depth = <number>connection.featureSet('max_depth') ?? 1
15571557
if (old_max_depth < 3) {
15581558
await connection.sendFeatureSetCommand('max_depth', 3)
1559-
}
1559+
}
15601560

15611561
const res = await connection.sendPropertyGetNameCommand('$__EXCEPTION', ctx[0])
15621562

15631563
const s = res.property.children.find(
15641564
p => p.name === 'trace' || p.name === '*Exception*trace' || p.name === '*Error*trace'
15651565
)
15661566

1567-
const at = `Created at ${res.property.children.find(p => p.name == 'file')?.value ?? '**UNKNOWN**'}:${
1568-
res.property.children.find(p => p.name == 'line')?.value ?? '?'
1569-
}\n`
1567+
const at = `Created at ${
1568+
res.property.children.find(p => p.name == 'file')?.value ?? '**UNKNOWN**'
1569+
}:${res.property.children.find(p => p.name == 'line')?.value ?? '?'}\n`
15701570
const st = s?.children
1571-
.map(
1572-
(t, i) =>
1573-
`at ${
1574-
t.children.find(p => p.name == 'class')?.value ?? ''}${
1575-
t.children.find(p => p.name == 'type')?.value ?? ''
1576-
}${t.children.find(p => p.name == 'function')?.value ?? '?'}() (${
1577-
t.children.find(p => p.name == 'file')?.value ?? '**UNKNOWN**'}:${
1578-
t.children.find(p => p.name == 'line')?.value ?? '?'
1579-
})`
1580-
)
1581-
.join('\n')
1571+
.map(
1572+
(t, i) =>
1573+
`at ${t.children.find(p => p.name == 'class')?.value ?? ''}${
1574+
t.children.find(p => p.name == 'type')?.value ?? ''
1575+
}${t.children.find(p => p.name == 'function')?.value ?? '?'}() (${
1576+
t.children.find(p => p.name == 'file')?.value ?? '**UNKNOWN**'
1577+
}:${t.children.find(p => p.name == 'line')?.value ?? '?'})`
1578+
)
1579+
.join('\n')
15821580
ex = {
15831581
message: res.property.children.find(p => p.name === 'message')?.value ?? undefined,
15841582
typeName: res.property.class,
15851583
fullTypeName: res.property.class,
15861584
evaluateName: '$__EXCEPTION',
1587-
stackTrace: `${at}${st}`,
1585+
stackTrace: `${at}${st ?? ''}`,
15881586
// TODO process inner/previous exception
15891587
}
15901588
}

src/xdebugConnection.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -845,9 +845,9 @@ export class Connection extends DbgpConnection {
845845
return this._pendingExecuteCommand
846846
}
847847

848-
private _featureSet = new Map<string, number|string>()
848+
private _featureSet = new Map<string, number | string>()
849849

850-
public featureSet(feature:string): number|string|undefined {
850+
public featureSet(feature: string): number | string | undefined {
851851
return this._featureSet.get(feature)
852852
}
853853

0 commit comments

Comments
 (0)