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

Make Win32Exception extend LastErrorException #613

Merged
merged 1 commit into from
Mar 8, 2016

Conversation

lgoldstein
Copy link
Contributor

It is only logical since this is what Win32Exception is actually used for

}

public LastErrorException(int code) {
super(formatMessage(code));
protected LastErrorException(int code, String msg) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any particular reason for making this one protected? If so, javadoc would be appropriate.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really, I just thought it would discourage programmers from creating a new instance that contains code and message unless they are using a derived class to do so (e.g., LinuxException, _MacException - similar to Win32Exception). However,I am quite fine with making it public...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense to me, you probably never want both. @twall feel free to merge this as is.

twall added a commit that referenced this pull request Mar 8, 2016
Make Win32Exception extend LastErrorException
@twall twall merged commit 6a7d6c2 into java-native-access:master Mar 8, 2016
@lgoldstein lgoldstein deleted the win32-as-last-error branch March 8, 2016 17:03
mstyura pushed a commit to mstyura/jna that referenced this pull request Sep 9, 2024
…ve-access#613)

Motivation:

We should add toString() implementations for our QuicEvent
implementations to make debugging easier.

Modifications:

Add toString() methods

Result:

Easier to log / debug events
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

Successfully merging this pull request may close these issues.

3 participants