Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception is caught when Exception is not thrown in Main.main #40

Open
marcoym2 opened this issue Aug 15, 2023 · 0 comments
Open

Exception is caught when Exception is not thrown in Main.main #40

marcoym2 opened this issue Aug 15, 2023 · 0 comments

Comments

@marcoym2
Copy link

marcoym2 commented Aug 15, 2023

Bug report: Exception is caught when Exception

Decription: Hotel-Management-Project-Java/Main.java:591 Exception is caught when Exception is not thrown in Main.main(String[]) [Of Concern(15), High confidence]

Tools usage: SpotBugs

To Repoduce:
using eclispe for Java develomet:
using the PMD to check the bugs
line : 591-595
expeced Behavior
catch(Exception e)
{
System.out.println("Not a valid input");
}

for catch the Exception e, we should throw the exception.

enviroment:
Eclipse ;

possible solution
catch(Exception e)
{
System.out.println("Not a valid input"+e.toString());
}

Severity:
low

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant