gpt4 book ai didi

com.quinsoft.zeidon.ZeidonException.prependFilename()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-13 11:03:02 26 4
gpt4 key购买 nike

本文整理了Java中com.quinsoft.zeidon.ZeidonException.prependFilename()方法的一些代码示例,展示了ZeidonException.prependFilename()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZeidonException.prependFilename()方法的具体详情如下:
包路径:com.quinsoft.zeidon.ZeidonException
类名称:ZeidonException
方法名:prependFilename

ZeidonException.prependFilename介绍

暂无

代码示例

代码示例来源:origin: com.quinsoft.zeidon/object-browser

private void createBrowserDir( String dir )
{
  File theDir = new File( dir );
  // if the directory does not exist, create it
  if ( theDir.exists() )
    return;
  try
  {
    theDir.mkdir();
  }
  catch ( Exception e )
  {
    throw ZeidonException.wrapException( e ).prependFilename( dir );
  }
}

代码示例来源:origin: com.quinsoft.zeidon/zeidon-joe

/**
 * Set the input stream by opening the file.
 *
 * @param file the file
 *
 * @return this
 */
public DeserializeOi fromFile( File file )
{
  try
  {
    resourceName = file.getAbsolutePath();
    inputStream = new FileInputStream( file );
    setFormatFromFilename( resourceName, true );
    return this;
  }
  catch ( FileNotFoundException e )
  {
    throw ZeidonException.wrapException( e ).prependFilename( resourceName );
  }
}

代码示例来源:origin: com.quinsoft.zeidon/zeidon-joe

@Override
public String getAllProperties()
{
  try
  {
    StringBuilder builder = new StringBuilder();
    for ( String sectionName : iniConfObj.getSections() )
    {
      builder.append( "[" ).append( sectionName ).append( "]\n" );
      for ( Iterator<String> iter = iniConfObj.getSection(sectionName).getKeys(); iter.hasNext(); )
      {
        String key = iter.next();
        builder.append( key ).append( "=" ).append( get( sectionName, key, null ) ).append( "\n" );
      }
      builder.append( "\n" );
    }
    return builder.toString();
  }
  catch ( Exception e )
  {
    throw ZeidonException.wrapException( e ).prependFilename( iniFileName );
  }
}

代码示例来源:origin: com.quinsoft.zeidon/zeidon-joe

throw ZeidonException.wrapException( e ).prependFilename( path );

代码示例来源:origin: com.quinsoft.zeidon/zeidon-joe

@Override
public void reload()
{
  ZeidonInputStream stream = null;
  try
  {
    properties = new Properties();
    stream = JoeUtils.getInputStream( null, filename, this.getClass().getClassLoader() );
    if ( stream == null )
      throw new ZeidonException( "Couldn't find property file" );
    LOG.info( "Opening properties from: " + stream.getDescription() );
    properties.load( stream );
    sourceDescription = stream.getDescription();
  }
  catch ( Exception e )
  {
    throw ZeidonException.wrapException( e ).prependFilename( filename );
  }
  finally
  {
    IOUtils.closeQuietly( stream );
  }
}

代码示例来源:origin: com.quinsoft.zeidon/zeidon-joe

throw ZeidonException.wrapException( e ).prependFilename( filename );

代码示例来源:origin: com.quinsoft.zeidon/zeidon-joe

throw ZeidonException.wrapException( e ).prependFilename( filename );

代码示例来源:origin: com.quinsoft.zeidon/zeidon-joe

/**
 * Activate all the OIs from the stream and return a list of views.
 *
 * @return list of views in the stream.
 */
public List<View> activate()
{
  try
  {
    return task.activateOisFromStream( this );
  }
  catch ( Exception e )
  {
    ZeidonException ze = ZeidonException.wrapException( e );
    if ( ! StringUtils.isBlank( resourceName ) )
      ze.prependFilename( resourceName );
    if ( ! StringUtils.isBlank( inputString ) )
      task.log().error( "OI String = %s", inputString );
    throw ze;
  }
}

代码示例来源:origin: com.quinsoft.zeidon/zeidon-joe

public static void ReadPortableFile( Task task, String filename, ZeidonLogger logger, PortableFileEntityHandler entityHandler )
{
  try
  {
    logger.debug( "Reading portable file %s", filename );
    InputStream is = JoeUtils.getInputStream(task, filename, entityHandler.getClass().getClassLoader());
    if ( is == null )
      throw new ZeidonException( "Couldn't find file %s", filename );
    ReadPortableFile( is, logger, entityHandler );
  }
  catch ( Exception e )
  {
    // Add filename to exception.
    throw ZeidonException.wrapException( e ).prependFilename( filename );
  }
}

代码示例来源:origin: com.quinsoft.zeidon/zeidon-joe

throw ZeidonException.wrapException( e ).prependFilename( filename );

代码示例来源:origin: com.quinsoft.zeidon/zeidon-joe

private void loadZeidonIni( InputStream iniFile )
{
  if ( iniFile == null )
    throw new ZeidonException( "Could not find " + iniFileName );
  InputStreamReader reader = new InputStreamReader( iniFile );
  try
  {
    DefaultExpressionEngine engine = new DefaultExpressionEngine( DefaultExpressionEngineSymbols.DEFAULT_SYMBOLS,
                                   NodeNameMatchers.EQUALS_IGNORE_CASE );
    Parameters params = new Parameters();
    FileBasedConfigurationBuilder<INIConfiguration> builder =
        new FileBasedConfigurationBuilder<INIConfiguration>( INIConfiguration.class )
        .configure( params.hierarchical().setExpressionEngine( engine ) );
    iniConfObj = builder.getConfiguration();
    iniConfObj.read( reader );
    reader.close();
    sectionNameMap = new HashMap<>();
    for ( String sectionName : iniConfObj.getSections() )
      sectionNameMap.put( sectionName.toLowerCase(), sectionName );
  }
  catch ( Exception e )
  {
    throw ZeidonException.wrapException( e ).prependFilename( iniFileName );
  }
  finally
  {
    IOUtils.closeQuietly( reader );
  }
}

代码示例来源:origin: com.quinsoft.zeidon/zeidon-joe

private void loadLodDef( Task task, InputStream file )
{
  try
  {
    PortableFileReader.ReadPortableFile( file, task.log(), new LodDefHandler( this ) );
    task.log().info( "LodDef %s loaded from: %s", this, filename );
  }
  catch ( Exception e )
  {
    throw ZeidonException.wrapException( e ).prependFilename( filename );
  }
}

代码示例来源:origin: com.quinsoft.zeidon/zeidon-joe

throw ZeidonException.wrapException( e ).prependFilename( resourceName );

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com