Skip to content
Permalink
Browse files
Merge branch 'corbaname_parse_diagnostics' into perf_helper_lookup
  • Loading branch information
ngmr committed Apr 15, 2015
2 parents 8a77b94 + e472226 commit 6f43916bd0ff7a38303ba85da1144b3b4f9199ba
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 9 deletions.
@@ -39,7 +39,7 @@ private static byte[] stringToKey(String keyStr) {
throw new org.omg.CORBA.BAD_PARAM(
MinorCodes
.describeBadParam(org.apache.yoko.orb.OB.MinorCodes.MinorBadSchemeSpecificPart)
+ ": invalid character in key",
+ ": invalid character in key, char value = 0x" + Integer.toHexString(ch),
org.apache.yoko.orb.OB.MinorCodes.MinorBadSchemeSpecificPart,
org.omg.CORBA.CompletionStatus.COMPLETED_NO);
}
@@ -80,7 +80,7 @@ private org.omg.CORBA.Object parse_addresses(String str, int startIdx,
throw new org.omg.CORBA.BAD_PARAM(
MinorCodes
.describeBadParam(org.apache.yoko.orb.OB.MinorCodes.MinorBadSchemeSpecificPart)
+ ": invalid initial reference token",
+ ": invalid initial reference token \"" + keyStr + "\"",
org.apache.yoko.orb.OB.MinorCodes.MinorBadSchemeSpecificPart,
org.omg.CORBA.CompletionStatus.COMPLETED_NO);
}
@@ -17,10 +17,17 @@

package org.apache.yoko.orb.OB;

import static org.apache.yoko.orb.OB.MinorCodes.MinorOther;
import static org.omg.CORBA.CompletionStatus.COMPLETED_NO;

import java.io.PrintWriter;
import java.io.StringWriter;

import org.apache.yoko.orb.OB.CorbalocURLScheme;
import org.apache.yoko.orb.OB.CorbalocURLSchemeHelper;
import org.apache.yoko.orb.OB.URLRegistry;
import org.apache.yoko.orb.OB.URLScheme;
import org.omg.CORBA.BAD_PARAM;

public class CorbanameURLScheme_impl extends org.omg.CORBA.LocalObject
implements URLScheme {
@@ -115,6 +122,7 @@ else if ((slash != -1 && fragmentStart == -1)
// Make a DII invocation on the Naming Service to resolve the
// specified context
//
Exception failureCause;
try {
//
// Create typecodes for Name and NameComponent
@@ -144,7 +152,7 @@ else if ((slash != -1 && fragmentStart == -1)
throw new org.omg.CORBA.BAD_PARAM(
MinorCodes
.describeBadParam(org.apache.yoko.orb.OB.MinorCodes.MinorBadSchemeSpecificPart)
+ ": invalid stringified name",
+ ": invalid stringified name \"" + fragment + "\"",
org.apache.yoko.orb.OB.MinorCodes.MinorBadSchemeSpecificPart,
org.omg.CORBA.CompletionStatus.COMPLETED_NO);

@@ -209,18 +217,22 @@ else if ((slash != -1 && fragmentStart == -1)
//
// Return the result if there was no exception
//
if (request.env().exception() == null)
failureCause = request.env().exception();
if (failureCause == null)
return request.return_value().extract_Object();

} catch (org.omg.CORBA.SystemException ex) {
failureCause = ex;
// Fall through
} catch (org.omg.CORBA.UserException ex) {
failureCause = ex;
// Fall through
}

throw new org.omg.CORBA.BAD_PARAM(org.apache.yoko.orb.OB.MinorCodes
.describeBadParam(org.apache.yoko.orb.OB.MinorCodes.MinorOther)
+ ": corbaname evaluation error", org.apache.yoko.orb.OB.MinorCodes.MinorOther,
org.omg.CORBA.CompletionStatus.COMPLETED_NO);
final BAD_PARAM bp = new BAD_PARAM(MinorCodes.describeBadParam(MinorOther)
+ ": corbaname evaluation error:" + failureCause.getMessage(), MinorOther,
COMPLETED_NO);
throw (BAD_PARAM)bp.initCause(failureCause);
}

public void destroy() {
@@ -72,7 +72,7 @@ public org.omg.CORBA.Object parse_url(String url) {
//
throw new org.omg.CORBA.BAD_PARAM(org.apache.yoko.orb.OB.MinorCodes
.describeBadParam(org.apache.yoko.orb.OB.MinorCodes.MinorBadSchemeSpecificPart)
+ ": invalid IOR", org.apache.yoko.orb.OB.MinorCodes.MinorBadSchemeSpecificPart,
+ ": invalid IOR \"" + url + "\"", org.apache.yoko.orb.OB.MinorCodes.MinorBadSchemeSpecificPart,
org.omg.CORBA.CompletionStatus.COMPLETED_NO);
}
}

0 comments on commit 6f43916

Please sign in to comment.