List of usage examples for java.lang StackOverflowError toString
public String toString()
From source file:org.kaaproject.kaa.server.common.dao.service.CtlServiceImpl.java
private CTLSchemaDto generateDefaultRecord(CTLSchemaDto unSavedSchema) { try {/*from ww w. j av a2s. c o m*/ String schemaBody = flatExportAsString(unSavedSchema); LOG.debug("Generating default record for flat schema: {}", schemaBody); RawSchema dataSchema = new RawSchema(schemaBody); DefaultRecordGenerationAlgorithm<RawData> dataProcessor = new DefaultRecordGenerationAlgorithmImpl<RawSchema, RawData>( dataSchema, new RawDataFactory()); unSavedSchema.setDefaultRecord(dataProcessor.getRootData().getRawData()); return unSavedSchema; } catch (StackOverflowError ex) { LOG.error( "Failed to generate default record. An endless recursion is detected. CTL schema " + "body: {}", unSavedSchema.getBody(), ex); throw new RuntimeException("Unable to generate default record. An endless recursion is " + "detected! " + "Please check non-optional references to nested types."); } catch (ConfigurationGenerationException | IOException | RuntimeException ex) { LOG.error("Failed to generate default record for CTL schema with body: {}", unSavedSchema.getBody(), ex); throw new RuntimeException("An unexpected exception occured: " + ex.toString()); } }