Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

exceptions -Netbeans build failed  RSS feed

 
ekte spiriopoulos
Ranch Hand
Posts: 217
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is an exception
Error.
Exception in thread "main" java.lang.IllegalArgumentException: Your number is false
at erg5.Erg5.main(Erg5.java:128)
C:\Users\ekte\AppData\Local\NetBeans\Cache\8.1\executor-snippets\run.xml:53: Java returned: 1
BUILD FAILED (total time: 15 seconds)

I did the exception but is wrong ? it shouldnt say build failed?
 
Knute Snortum
Sheriff
Posts: 4073
112
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
at erg5.Erg5.main(Erg5.java:128)

This tells you that the program Erg5 got an error at line 128 in the method main. Can you tell why you got an IllegalArgumentException there? If not, post the code of Erg5.java.
 
ekte spiriopoulos
Ranch Hand
Posts: 217
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Knute Snortum wrote:at erg5.Erg5.main(Erg5.java:128)

This tells you that the program Erg5 got an error at line 128 in the method main. Can you tell why you got an IllegalArgumentException there? If not, post the code of Erg5.java.
i dont put the whole code here
 
Knute Snortum
Sheriff
Posts: 4073
112
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know if it's a typo, but you have int mer = 90; and then you test against the variable meR. Java is case sensitive so those are two different variables.

I'd also put some information in the thrown error:
 
ekte spiriopoulos
Ranch Hand
Posts: 217
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Knute Snortum wrote:I don't know if it's a typo, but you have int mer = 90; and then you test against the variable meR. Java is case sensitive so those are two different variables.

I'd also put some information in the thrown error:
i thought maybe needs try -catch but it doesnt right?
 
Knute Snortum
Sheriff
Posts: 4073
112
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i thought maybe needs try -catch but it doesnt right?

Not to throw an error, no.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!