8383174: Improve exceptions in Java_sun_net_www_protocol_http_ntlm_NTLMAuthSequence_getNextToken

Reviewed-by: djelinski, clanger
This commit is contained in:
Matthias Baesken 2026-04-27 11:10:38 +00:00
parent 95791f3b5f
commit 1586790df5

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2026, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -231,7 +231,7 @@ JNIEXPORT jbyteArray JNICALL Java_sun_net_www_protocol_http_ntlm_NTLMAuthSequenc
if (ss < 0) {
SetLastError(ss);
JNU_ThrowIOExceptionWithLastError(env, "InitializeSecurityContext");
JNU_ThrowIOExceptionWithMessageAndLastError(env, "InitializeSecurityContext");
endSequence (pCred, pCtx, env, status);
return 0;
}
@ -241,7 +241,7 @@ JNIEXPORT jbyteArray JNICALL Java_sun_net_www_protocol_http_ntlm_NTLMAuthSequenc
if (ss < 0) {
SetLastError(ss);
JNU_ThrowIOExceptionWithLastError(env, "CompleteAuthToken");
JNU_ThrowIOExceptionWithMessageAndLastError(env, "CompleteAuthToken");
endSequence (pCred, pCtx, env, status);
return 0;
}