Skip to content

Commit

Permalink
Merge branch 'platypusguy:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
texadactyl authored Dec 24, 2023
2 parents dd2d375 + 8c05df2 commit 346cbf8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/classloader/classes.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,11 @@ func FetchMethodAndCP(className, methName, methType string) (MTentry, error) {
if methName == "main" {
// the starting className is always loaded, so if main() isn't found
// right away, just bail.

noMainError(origClassName)
shutdown.Exit(shutdown.JVM_EXCEPTION)
// noMainError() calls shutdown.Exit(). However, in test mode, shutdown.Eexit() doesn't exit,
// so the following error return is needed
return MTentry{}, errors.New("Error: main() method not found in class " + origClassName + "\n")
}
_ = log.Log("FetchMethodAndCP: LoadClassFromNameOnly for "+className+" failed: "+err.Error(), log.WARNING)
_ = log.Log(err.Error(), log.SEVERE)
Expand Down

0 comments on commit 346cbf8

Please sign in to comment.