List of usage examples for java.lang RuntimeException getClass
@HotSpotIntrinsicCandidate public final native Class<?> getClass();
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskSaxLoader.CFAsteriskSaxLoaderTenantHandler.java
public void startElement(String uri, String localName, String qName, Attributes attrs) throws SAXException { try {/*from w w w . j a v a 2 s . c o m*/ final String S_ProcName = "startElement"; assert qName.equals("Tenant"); CFAsteriskSaxLoader saxLoader = (CFAsteriskSaxLoader) getParser(); if (saxLoader == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "getParser()"); } ICFAsteriskSchemaObj schemaObj = saxLoader.getSchemaObj(); if (schemaObj == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "getParser().getSchemaObj()"); } CFLibXmlCoreContext curContext = getParser().getCurContext(); ICFSecurityTenantObj useTenant = saxLoader.getUseTenant(); if (useTenant == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "saxLoader.useTenant"); } curContext.putNamedValue("Object", useTenant); } catch (RuntimeException e) { throw new RuntimeException("Near " + getParser().getLocationInfo() + ": Caught and rethrew " + e.getClass().getName() + " - " + e.getMessage(), e); } catch (Error e) { throw new Error("Near " + getParser().getLocationInfo() + ": Caught and rethrew " + e.getClass().getName() + " - " + e.getMessage(), e); } }
From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamSaxLoader.CFBamSaxLoaderClusterHandler.java
public void startElement(String uri, String localName, String qName, Attributes attrs) throws SAXException { try {/* www . j a va 2 s .c o m*/ final String S_ProcName = "startElement"; assert qName.equals("Cluster"); CFBamSaxLoader saxLoader = (CFBamSaxLoader) getParser(); if (saxLoader == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "getParser()"); } ICFBamSchemaObj schemaObj = saxLoader.getSchemaObj(); if (schemaObj == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "getParser().getSchemaObj()"); } CFLibXmlCoreContext curContext = getParser().getCurContext(); ICFSecurityClusterObj useCluster = saxLoader.getUseCluster(); if (useCluster == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "saxLoader.useCluster"); } curContext.putNamedValue("Object", useCluster); } catch (RuntimeException e) { throw new RuntimeException("Near " + getParser().getLocationInfo() + ": Caught and rethrew " + e.getClass().getName() + " - " + e.getMessage(), e); } catch (Error e) { throw new Error("Near " + getParser().getLocationInfo() + ": Caught and rethrew " + e.getClass().getName() + " - " + e.getMessage(), e); } }
From source file:net.sourceforge.msscodefactory.cfbam.v2_9.CFBamSaxLoader.CFBamSaxLoaderTenantHandler.java
public void startElement(String uri, String localName, String qName, Attributes attrs) throws SAXException { try {/*ww w .jav a 2 s . c o m*/ final String S_ProcName = "startElement"; assert qName.equals("Tenant"); CFBamSaxLoader saxLoader = (CFBamSaxLoader) getParser(); if (saxLoader == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "getParser()"); } ICFBamSchemaObj schemaObj = saxLoader.getSchemaObj(); if (schemaObj == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "getParser().getSchemaObj()"); } CFLibXmlCoreContext curContext = getParser().getCurContext(); ICFSecurityTenantObj useTenant = saxLoader.getUseTenant(); if (useTenant == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "saxLoader.useTenant"); } curContext.putNamedValue("Object", useTenant); } catch (RuntimeException e) { throw new RuntimeException("Near " + getParser().getLocationInfo() + ": Caught and rethrew " + e.getClass().getName() + " - " + e.getMessage(), e); } catch (Error e) { throw new Error("Near " + getParser().getLocationInfo() + ": Caught and rethrew " + e.getClass().getName() + " - " + e.getMessage(), e); } }
From source file:com.android.tests.lib.UnitTest.java
@Test public void exceptions() { try {// ww w . j ava 2s . c o m ArrayMap map = new ArrayMap(); map.isEmpty(); fail(); } catch (RuntimeException e) { assertEquals(RuntimeException.class, e.getClass()); assertTrue(e.getMessage().contains("isEmpty")); assertTrue(e.getMessage().contains("not mocked")); assertTrue(e.getMessage().contains("androidstudio/not-mocked")); } try { Debug.getThreadAllocCount(); fail(); } catch (RuntimeException e) { assertEquals(RuntimeException.class, e.getClass()); assertTrue(e.getMessage().contains("getThreadAllocCount")); assertTrue(e.getMessage().contains("not mocked")); assertTrue(e.getMessage().contains("androidstudio/not-mocked")); } }
From source file:com.android.tests.lib.LibUnitTest.java
@Test public void exceptions() { try {/* www. j av a 2 s .co m*/ ArrayMap map = new ArrayMap(); map.isEmpty(); fail(); } catch (RuntimeException e) { assertEquals(RuntimeException.class, e.getClass()); assertTrue(e.getMessage().contains("isEmpty")); assertTrue(e.getMessage().contains("not mocked")); } try { Debug.getThreadAllocCount(); fail(); } catch (RuntimeException e) { assertEquals(RuntimeException.class, e.getClass()); assertTrue(e.getMessage().contains("getThreadAllocCount")); assertTrue(e.getMessage().contains("not mocked")); } }
From source file:net.sourceforge.msscodefactory.cfcrm.v2_0.CFCrmXMsgRspnHandler.CFCrmXMsgRspnAuditActionReadSingleHandler.java
public void startElement(String uri, String localName, String qName, Attributes attrs) throws SAXException { try {/* ww w . ja v a 2 s .c o m*/ // Common XML Attributes String attrId = null; // Attribute Extraction String attrLocalName; int numAttrs; int idxAttr; final String S_ProcName = "startElement"; final String S_LocalName = "LocalName"; assert qName.equals("RspnAuditActionReadSingle"); CFCrmXMsgRspnHandler xmsgRspnHandler = (CFCrmXMsgRspnHandler) getParser(); if (xmsgRspnHandler == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "getParser()"); } ICFCrmSchemaObj schemaObj = xmsgRspnHandler.getSchemaObj(); if (schemaObj == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "getParser().getSchemaObj()"); } // Extract Attributes numAttrs = attrs.getLength(); for (idxAttr = 0; idxAttr < numAttrs; idxAttr++) { attrLocalName = attrs.getLocalName(idxAttr); if (attrLocalName.equals("Id")) { if (attrId != null) { throw CFLib.getDefaultExceptionFactory().newUniqueIndexViolationException(getClass(), S_ProcName, S_LocalName, attrLocalName); } attrId = attrs.getValue(idxAttr); } else if (attrLocalName.equals("schemaLocation")) { // ignored } else { throw CFLib.getDefaultExceptionFactory().newUnrecognizedAttributeException(getClass(), S_ProcName, getParser().getLocationInfo(), attrLocalName); } } // Save named attributes to context CFLibXmlCoreContext curContext = getParser().getCurContext(); // Convert string attributes to native Java types } catch (RuntimeException e) { throw new RuntimeException("Near " + getParser().getLocationInfo() + ": Caught and rethrew " + e.getClass().getName() + " - " + e.getMessage(), e); } catch (Error e) { throw new Error("Near " + getParser().getLocationInfo() + ": Caught and rethrew " + e.getClass().getName() + " - " + e.getMessage(), e); } }
From source file:net.sourceforge.msscodefactory.cfcrm.v2_0.CFCrmXMsgRspnHandler.CFCrmXMsgRspnClusterReadSingleHandler.java
public void startElement(String uri, String localName, String qName, Attributes attrs) throws SAXException { try {//from w w w . jav a2 s. com // Common XML Attributes String attrId = null; // Attribute Extraction String attrLocalName; int numAttrs; int idxAttr; final String S_ProcName = "startElement"; final String S_LocalName = "LocalName"; assert qName.equals("RspnClusterReadSingle"); CFCrmXMsgRspnHandler xmsgRspnHandler = (CFCrmXMsgRspnHandler) getParser(); if (xmsgRspnHandler == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "getParser()"); } ICFCrmSchemaObj schemaObj = xmsgRspnHandler.getSchemaObj(); if (schemaObj == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "getParser().getSchemaObj()"); } // Extract Attributes numAttrs = attrs.getLength(); for (idxAttr = 0; idxAttr < numAttrs; idxAttr++) { attrLocalName = attrs.getLocalName(idxAttr); if (attrLocalName.equals("Id")) { if (attrId != null) { throw CFLib.getDefaultExceptionFactory().newUniqueIndexViolationException(getClass(), S_ProcName, S_LocalName, attrLocalName); } attrId = attrs.getValue(idxAttr); } else if (attrLocalName.equals("schemaLocation")) { // ignored } else { throw CFLib.getDefaultExceptionFactory().newUnrecognizedAttributeException(getClass(), S_ProcName, getParser().getLocationInfo(), attrLocalName); } } // Save named attributes to context CFLibXmlCoreContext curContext = getParser().getCurContext(); // Convert string attributes to native Java types } catch (RuntimeException e) { throw new RuntimeException("Near " + getParser().getLocationInfo() + ": Caught and rethrew " + e.getClass().getName() + " - " + e.getMessage(), e); } catch (Error e) { throw new Error("Near " + getParser().getLocationInfo() + ": Caught and rethrew " + e.getClass().getName() + " - " + e.getMessage(), e); } }
From source file:net.sourceforge.msscodefactory.cfcrm.v2_0.CFCrmXMsgRspnHandler.CFCrmXMsgRspnContactReadSingleHandler.java
public void startElement(String uri, String localName, String qName, Attributes attrs) throws SAXException { try {/* w w w . j a v a 2 s .c om*/ // Common XML Attributes String attrId = null; // Attribute Extraction String attrLocalName; int numAttrs; int idxAttr; final String S_ProcName = "startElement"; final String S_LocalName = "LocalName"; assert qName.equals("RspnContactReadSingle"); CFCrmXMsgRspnHandler xmsgRspnHandler = (CFCrmXMsgRspnHandler) getParser(); if (xmsgRspnHandler == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "getParser()"); } ICFCrmSchemaObj schemaObj = xmsgRspnHandler.getSchemaObj(); if (schemaObj == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "getParser().getSchemaObj()"); } // Extract Attributes numAttrs = attrs.getLength(); for (idxAttr = 0; idxAttr < numAttrs; idxAttr++) { attrLocalName = attrs.getLocalName(idxAttr); if (attrLocalName.equals("Id")) { if (attrId != null) { throw CFLib.getDefaultExceptionFactory().newUniqueIndexViolationException(getClass(), S_ProcName, S_LocalName, attrLocalName); } attrId = attrs.getValue(idxAttr); } else if (attrLocalName.equals("schemaLocation")) { // ignored } else { throw CFLib.getDefaultExceptionFactory().newUnrecognizedAttributeException(getClass(), S_ProcName, getParser().getLocationInfo(), attrLocalName); } } // Save named attributes to context CFLibXmlCoreContext curContext = getParser().getCurContext(); // Convert string attributes to native Java types } catch (RuntimeException e) { throw new RuntimeException("Near " + getParser().getLocationInfo() + ": Caught and rethrew " + e.getClass().getName() + " - " + e.getMessage(), e); } catch (Error e) { throw new Error("Near " + getParser().getLocationInfo() + ": Caught and rethrew " + e.getClass().getName() + " - " + e.getMessage(), e); } }
From source file:net.sourceforge.msscodefactory.cfcrm.v2_0.CFCrmXMsgRspnHandler.CFCrmXMsgRspnContactURLReadSingleHandler.java
public void startElement(String uri, String localName, String qName, Attributes attrs) throws SAXException { try {//w ww . ja v a 2s. co m // Common XML Attributes String attrId = null; // Attribute Extraction String attrLocalName; int numAttrs; int idxAttr; final String S_ProcName = "startElement"; final String S_LocalName = "LocalName"; assert qName.equals("RspnContactURLReadSingle"); CFCrmXMsgRspnHandler xmsgRspnHandler = (CFCrmXMsgRspnHandler) getParser(); if (xmsgRspnHandler == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "getParser()"); } ICFCrmSchemaObj schemaObj = xmsgRspnHandler.getSchemaObj(); if (schemaObj == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "getParser().getSchemaObj()"); } // Extract Attributes numAttrs = attrs.getLength(); for (idxAttr = 0; idxAttr < numAttrs; idxAttr++) { attrLocalName = attrs.getLocalName(idxAttr); if (attrLocalName.equals("Id")) { if (attrId != null) { throw CFLib.getDefaultExceptionFactory().newUniqueIndexViolationException(getClass(), S_ProcName, S_LocalName, attrLocalName); } attrId = attrs.getValue(idxAttr); } else if (attrLocalName.equals("schemaLocation")) { // ignored } else { throw CFLib.getDefaultExceptionFactory().newUnrecognizedAttributeException(getClass(), S_ProcName, getParser().getLocationInfo(), attrLocalName); } } // Save named attributes to context CFLibXmlCoreContext curContext = getParser().getCurContext(); // Convert string attributes to native Java types } catch (RuntimeException e) { throw new RuntimeException("Near " + getParser().getLocationInfo() + ": Caught and rethrew " + e.getClass().getName() + " - " + e.getMessage(), e); } catch (Error e) { throw new Error("Near " + getParser().getLocationInfo() + ": Caught and rethrew " + e.getClass().getName() + " - " + e.getMessage(), e); } }
From source file:net.sourceforge.msscodefactory.cfcrm.v2_0.CFCrmXMsgRspnHandler.CFCrmXMsgRspnDomainReadSingleHandler.java
public void startElement(String uri, String localName, String qName, Attributes attrs) throws SAXException { try {//from ww w.ja v a 2s . c o m // Common XML Attributes String attrId = null; // Attribute Extraction String attrLocalName; int numAttrs; int idxAttr; final String S_ProcName = "startElement"; final String S_LocalName = "LocalName"; assert qName.equals("RspnDomainReadSingle"); CFCrmXMsgRspnHandler xmsgRspnHandler = (CFCrmXMsgRspnHandler) getParser(); if (xmsgRspnHandler == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "getParser()"); } ICFCrmSchemaObj schemaObj = xmsgRspnHandler.getSchemaObj(); if (schemaObj == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "getParser().getSchemaObj()"); } // Extract Attributes numAttrs = attrs.getLength(); for (idxAttr = 0; idxAttr < numAttrs; idxAttr++) { attrLocalName = attrs.getLocalName(idxAttr); if (attrLocalName.equals("Id")) { if (attrId != null) { throw CFLib.getDefaultExceptionFactory().newUniqueIndexViolationException(getClass(), S_ProcName, S_LocalName, attrLocalName); } attrId = attrs.getValue(idxAttr); } else if (attrLocalName.equals("schemaLocation")) { // ignored } else { throw CFLib.getDefaultExceptionFactory().newUnrecognizedAttributeException(getClass(), S_ProcName, getParser().getLocationInfo(), attrLocalName); } } // Save named attributes to context CFLibXmlCoreContext curContext = getParser().getCurContext(); // Convert string attributes to native Java types } catch (RuntimeException e) { throw new RuntimeException("Near " + getParser().getLocationInfo() + ": Caught and rethrew " + e.getClass().getName() + " - " + e.getMessage(), e); } catch (Error e) { throw new Error("Near " + getParser().getLocationInfo() + ": Caught and rethrew " + e.getClass().getName() + " - " + e.getMessage(), e); } }