mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-21 06:54:08 -07:00
Wrap scan steps in try catch
This commit is contained in:
parent
f717f4bf22
commit
0d50f7a70a
1 changed files with 35 additions and 18 deletions
|
|
@ -384,6 +384,7 @@ export class AppScan {
|
||||||
}
|
}
|
||||||
|
|
||||||
async start () {
|
async start () {
|
||||||
|
try {
|
||||||
// Load in the file
|
// Load in the file
|
||||||
this.sendMessage({
|
this.sendMessage({
|
||||||
message: '🚛 Loading file...',
|
message: '🚛 Loading file...',
|
||||||
|
|
@ -406,8 +407,24 @@ export class AppScan {
|
||||||
this.storeResultInfo()
|
this.storeResultInfo()
|
||||||
|
|
||||||
this.sendMessage({
|
this.sendMessage({
|
||||||
message: '🏁 Scan complete',
|
message: '🔎 Checking online for native versions...',
|
||||||
|
status: 'checking'
|
||||||
|
})
|
||||||
|
|
||||||
|
// Sleep for 3 seconds
|
||||||
|
// await new Promise( resolve => setTimeout( resolve, 3000 ) )
|
||||||
|
|
||||||
|
this.sendMessage({
|
||||||
|
message: '🏁 Scan complete! ',
|
||||||
status: 'complete'
|
status: 'complete'
|
||||||
})
|
})
|
||||||
|
|
||||||
|
} catch ( error ) {
|
||||||
|
this.sendMessage({
|
||||||
|
message: '🚫 Error: ' + error.message,
|
||||||
|
status: 'error',
|
||||||
|
error
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue