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

NoSuchElementException: No value present from ParseMojo #1599

Closed
yegor256 opened this issue Dec 21, 2022 · 2 comments
Closed

NoSuchElementException: No value present from ParseMojo #1599

yegor256 opened this issue Dec 21, 2022 · 2 comments
Assignees
Labels

Comments

@yegor256
Copy link
Member

I'm getting this pretty weird stack trace. Would be great to throw a more context-rich error message.

Caused by: java.lang.IllegalArgumentException: No value present
    at org.eolang.maven.ParseMojo.exec (ParseMojo.java:162)
    at org.eolang.maven.SafeMojo.lambda$execWithTimeout$3 (SafeMojo.java:315)
    at java.util.concurrent.FutureTask.run (FutureTask.java:264)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1128)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:628)
    at java.lang.Thread.run (Thread.java:829)
Caused by: java.util.concurrent.ExecutionException: java.util.NoSuchElementException: No value present
    at java.util.concurrent.FutureTask.report (FutureTask.java:122)
    at java.util.concurrent.FutureTask.get (FutureTask.java:191)
    at org.eolang.maven.ParseMojo.exec (ParseMojo.java:159)
    at org.eolang.maven.SafeMojo.lambda$execWithTimeout$3 (SafeMojo.java:315)
    at java.util.concurrent.FutureTask.run (FutureTask.java:264)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1128)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:628)
    at java.lang.Thread.run (Thread.java:829)
Caused by: java.util.NoSuchElementException: No value present
    at java.util.Optional.get (Optional.java:148)
    at com.yegor256.tojos.MonoTojo.get (MonoTojo.java:73)
    at org.eolang.maven.ParseMojo.parse (ParseMojo.java:196)
    at org.eolang.maven.ParseMojo.lambda$exec$1 (ParseMojo.java:139)
    at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:515)
    at java.util.concurrent.FutureTask.run (FutureTask.java:264)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1128)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:628)
    at java.lang.Thread.run (Thread.java:829)
@volodya-lombrozo
Copy link
Member

@yegor256 duplicate for #1574

@yegor256
Copy link
Member Author

Duplicate of #1574

@yegor256 yegor256 marked this as a duplicate of #1574 Dec 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants