Add better handling of undefined entry points.

This commit is contained in:
Cutieguwu
2026-02-15 20:27:57 -05:00
parent 4404aba65f
commit a3c208555a
4 changed files with 8 additions and 2 deletions

2
Cargo.lock generated
View File

@@ -166,7 +166,7 @@ dependencies = [
[[package]]
name = "core"
version = "0.1.1"
version = "0.1.2"
dependencies = [
"anyhow",
"derive_more",

View File

@@ -1,6 +1,6 @@
[package]
name = "core"
version = "0.1.1"
version = "0.1.2"
edition.workspace = true
license.workspace = true

View File

@@ -18,5 +18,7 @@ pub enum Error {
#[from]
TomlSerialize(toml::ser::Error),
UndefinedEntryPoint,
UnknownPackage,
}

View File

@@ -158,6 +158,10 @@ impl WorkspaceHandler {
.entry_point();
}
if entry_point.file_name().is_none() {
return Err(Error::UndefinedEntryPoint);
}
java::runtime::JVMBuilder::new(Self::DIR_TARGET)
.assertions(assertions)
.monitor(true)