Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
impl user error exception #128
Closed
Conversation
Collaborator
andxu
commented
Dec 11, 2017
|
2. refactor the error handling for ResolveClasspathsHandler
| package com.microsoft.java.debug.core; | ||
|
|
||
| public class UserErrorException extends DebugException { | ||
| private static final long serialVersionUID = -6001456457602995764L; |
yaohaizh
Dec 11, 2017
What is this magic number for? Please comment it
What is this magic number for? Please comment it
andxu
Dec 11, 2017
Author
Collaborator
serialVersionUID is generated by eclipse using random number, it is used serialization orelse there will be a compilation warning.
serialVersionUID is generated by eclipse using random number, it is used serialization orelse there will be a compilation warning.
...icrosoft.java.debug.core/src/main/java/com/microsoft/java/debug/core/UserErrorException.java
Outdated
| private static final long serialVersionUID = -6001456457602995764L; | ||
|
|
||
| /** | ||
| * Create an user error exception indicates an user setting/operation is illegal by design. |
yaohaizh
Dec 11, 2017
an ==> a
an ==> a
| package com.microsoft.java.debug.core; | ||
|
|
||
| public class UserErrorException extends DebugException { | ||
| private static final long serialVersionUID = -6001456457602995764L; |
yaohaizh
Dec 11, 2017
Naming convention for final static
Naming convention for final static
| if (javaProject == null) { | ||
| throw new CoreException(new Status(IStatus.ERROR, JavaDebuggerServerPlugin.PLUGIN_ID, | ||
| String.format("The project '%s' is not a valid java project.", projectName))); | ||
| private static IJavaProject getJavaProjectFromName(String projectName) throws DebugException { |
yaohaizh
Dec 11, 2017
Could we make this as a Utility class?
Could we make this as a Utility class?
andxu
Dec 11, 2017
Author
Collaborator
It is in jinbo's change.
It is in jinbo's change.
andxu
Dec 13, 2017
Author
Collaborator
JdtUtils.getJavaProjectFromName doesn't have the right error message for not-existing projects and non-java projects.
JdtUtils.getJavaProjectFromName doesn't have the right error message for not-existing projects and non-java projects.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.