Skip to content

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

@marcoym2

Description

@marcoym2

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions