[nostalgia/studio] Remove unnecessary try/catch block
This commit is contained in:
parent
395e262e3e
commit
be3d094f13
@ -32,12 +32,7 @@ static ox::Error run(ox::UniquePtr<ox::FileSystem> fs) noexcept {
|
|||||||
oxRequireM(ctx, core::init(std::move(fs), "NostalgiaStudio"));
|
oxRequireM(ctx, core::init(std::move(fs), "NostalgiaStudio"));
|
||||||
core::setWindowTitle(ctx.get(), "Nostalgia Studio");
|
core::setWindowTitle(ctx.get(), "Nostalgia Studio");
|
||||||
core::setEventHandler(ctx.get(), eventHandler);
|
core::setEventHandler(ctx.get(), eventHandler);
|
||||||
ox::UniquePtr<StudioUI> ui;
|
auto ui = ox::make_unique<StudioUI>(ctx.get());
|
||||||
try {
|
|
||||||
ui = ox::make_unique<StudioUI>(ctx.get());
|
|
||||||
} catch (ox::Exception &ex) {
|
|
||||||
return ex.toError();
|
|
||||||
}
|
|
||||||
StudioUIDrawer drawer(ui.get());
|
StudioUIDrawer drawer(ui.get());
|
||||||
ctx->setCustomData(ui.get());
|
ctx->setCustomData(ui.get());
|
||||||
ctx->drawers.emplace_back(&drawer);
|
ctx->drawers.emplace_back(&drawer);
|
||||||
|
Loading…
Reference in New Issue
Block a user