Skip to content

Commit

Permalink
Remove try-catch block
Browse files Browse the repository at this point in the history
  • Loading branch information
AnastasiaSliusar committed Dec 17, 2024
1 parent b13ef95 commit 04ac6fd
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions packages/xeus/src/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,17 +138,14 @@ export class XeusRemoteKernel {
const pkgRootUrl = URLExt.join(baseUrl, 'xeus/kernel_packages');

let packageData: IPackagesInfo = {};
try {
packageData = await bootstrapFromEmpackPackedEnvironment(
packagesJsonUrl,
verbose,
false,
globalThis.Module,
pkgRootUrl
);
} catch (error: any) {
throw new Error(error.message);
}
packageData = await bootstrapFromEmpackPackedEnvironment(
packagesJsonUrl,
verbose,
false,
globalThis.Module,
pkgRootUrl
);

if (kernelSpec.name === 'xpython') {
if (Object.keys(packageData).length) {
const { pythonVersion, prefix } = packageData;
Expand Down

0 comments on commit 04ac6fd

Please sign in to comment.