java.lang.IllegalArgumentException.printStackTrace()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(5.9k)|赞(0)|评价(0)|浏览(226)

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

IllegalArgumentException.printStackTrace介绍

暂无

代码示例

代码示例来源:origin: Bilibili/DanmakuFlameMaster

public static int getNativeConfig(Bitmap.Config config) {
  try {
    if (nativeIntField == null) {
      return 0;
    }
    return nativeIntField.getInt(config);
  } catch (IllegalArgumentException e) {
    e.printStackTrace();
  } catch (IllegalAccessException e) {
    e.printStackTrace();
  }
  return 0;
}

代码示例来源:origin: chrisbanes/PhotoView

@Override
  public boolean onInterceptTouchEvent(MotionEvent ev) {
    try {
      return super.onInterceptTouchEvent(ev);
    } catch (IllegalArgumentException e) {
      e.printStackTrace();
      return false;
    }
  }
}

代码示例来源:origin: RobotiumTech/robotium

private Object getValue(Field field) {
    if (field == null) {
      return null;
    }
    Object obj = null;
    try {
      obj = field.get(object);
    } catch (IllegalArgumentException e) {
      e.printStackTrace();
    } catch (IllegalAccessException e) {
      e.printStackTrace();
    }
    return obj;
  }
}

代码示例来源:origin: apache/zookeeper

static private InputArchive createArchive(InputStream in, String format)
throws IOException {
  Method factory = (Method) archiveFactory.get(format);
  if (factory != null) {
    Object[] params = { in };
    try {
      return (InputArchive) factory.invoke(null, params);
    } catch (IllegalArgumentException ex) {
      ex.printStackTrace();
    } catch (InvocationTargetException ex) {
      ex.printStackTrace();
    } catch (IllegalAccessException ex) {
      ex.printStackTrace();
    }
  }
  return null;
}
/**

代码示例来源:origin: apache/zookeeper

static private OutputArchive createArchive(OutputStream out,
    String format)
    throws IOException {
  Method factory = (Method) archiveFactory.get(format);
  if (factory != null) {
    Object[] params = { out };
    try {
      return (OutputArchive) factory.invoke(null, params);
    } catch (IllegalArgumentException ex) {
      ex.printStackTrace();
    } catch (InvocationTargetException ex) {
      ex.printStackTrace();
    } catch (IllegalAccessException ex) {
      ex.printStackTrace();
    }
  }
  return null;
}
/**

代码示例来源:origin: linlinjava/litemall

@ExceptionHandler(IllegalArgumentException.class)
@ResponseBody
public Object badArgumentHandler(IllegalArgumentException e) {
  e.printStackTrace();
  return ResponseUtil.badArgumentValue();
}

代码示例来源:origin: smuyyh/BookReader

@Override
  public boolean onInterceptTouchEvent(MotionEvent ev) {
    try {
      return super.onInterceptTouchEvent(ev);
    } catch (IllegalArgumentException e) {
      e.printStackTrace();
      return false;
    }
  }
}

代码示例来源:origin: chentao0707/SimplifyReader

@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
  if (!isLocked) {
    try {
      return super.onInterceptTouchEvent(ev);
    } catch (IllegalArgumentException e) {
      e.printStackTrace();
      return false;
    }
  }
  return false;
}

代码示例来源:origin: jeasonlzy/ImagePicker

@Override
public boolean onTouchEvent(MotionEvent ev) {
  try {
    return super.onTouchEvent(ev);
  } catch (IllegalArgumentException ex) {
    ex.printStackTrace();
  }
  return false;
}

代码示例来源:origin: jeasonlzy/ImagePicker

@Override
  public boolean onInterceptTouchEvent(MotionEvent ev) {
    try {
      return super.onInterceptTouchEvent(ev);
    } catch (IllegalArgumentException ex) {
      ex.printStackTrace();
    }
    return false;
  }
}

代码示例来源:origin: com.h2database/h2

/**
 * Get a boolean property value from a properties object.
 *
 * @param prop the properties object
 * @param key the key
 * @param def the default value
 * @return the value if set, or the default value if not
 */
public static boolean getBooleanProperty(Properties prop, String key,
    boolean def) {
  try {
    return Utils.parseBoolean(prop.getProperty(key, null), def, true);
  } catch (IllegalArgumentException e) {
    e.printStackTrace();
    return def;
  }
}

代码示例来源:origin: jaydenxiao2016/AndroidFire

@Override
  public boolean onInterceptTouchEvent(MotionEvent ev) {
    try {
      return super.onInterceptTouchEvent(ev);
    } catch (IllegalArgumentException ex) {
      ex.printStackTrace();
    }
    return false;
  }
}

代码示例来源:origin: jaydenxiao2016/AndroidFire

@Override
public boolean onTouchEvent(MotionEvent ev) {
  try {
    return super.onTouchEvent(ev);
  } catch (IllegalArgumentException ex) {
    ex.printStackTrace();
  }
  return false;
}

代码示例来源:origin: Rukey7/MvpApp

@Override
public boolean onTouchEvent(MotionEvent ev) {
  try {
    return super.onTouchEvent(ev);
  } catch (IllegalArgumentException ex) {
    ex.printStackTrace();
  }
  return false;
}

代码示例来源:origin: Rukey7/MvpApp

@Override
  public boolean onInterceptTouchEvent(MotionEvent ev) {
    try {
      return super.onInterceptTouchEvent(ev);
    } catch (IllegalArgumentException ex) {
      ex.printStackTrace();
    }
    return false;
  }
}

代码示例来源:origin: RobotiumTech/robotium

/**
 * Set a value to a field 
 * 
 * @param value the value to set
 */

public void in(Object value) {
  Field field = getField();
  try {
    field.set(object, value);
  } catch (IllegalArgumentException e) {
    e.printStackTrace();
  } catch (IllegalAccessException e) {
    e.printStackTrace();
  }
}

代码示例来源:origin: abel533/Mapper

@Override
public void addMappedStatement(MappedStatement ms) {
  try {
    super.addMappedStatement(ms);
    //没有任何配置时,使用默认配置
    if (this.mapperHelper == null) {
      this.mapperHelper = new MapperHelper();
    }
    this.mapperHelper.processMappedStatement(ms);
  } catch (IllegalArgumentException e) {
    //这里的异常是导致 Spring 启动死循环的关键位置,为了避免后续会吞异常,这里直接输出
    e.printStackTrace();
    throw new RuntimeException(e);
  }
}

代码示例来源:origin: abel533/Mapper

@Override
public void addMappedStatement(MappedStatement ms) {
  try {
    super.addMappedStatement(ms);
    //没有任何配置时,使用默认配置
    if (this.mapperHelper == null) {
      this.mapperHelper = new MapperHelper();
    }
    this.mapperHelper.processMappedStatement(ms);
  } catch (IllegalArgumentException e) {
    //这里的异常是导致 Spring 启动死循环的关键位置,为了避免后续会吞异常,这里直接输出
    e.printStackTrace();
    throw new RuntimeException(e);
  }
}

代码示例来源:origin: azkaban/azkaban

private void failIfNotException(final Props props) {
  try {
   PropsUtils.resolveProps(props);
   Assert.fail();
  } catch (final UndefinedPropertyException e) {
   e.printStackTrace();
  } catch (final IllegalArgumentException e) {
   e.printStackTrace();
  }
 }
}

代码示例来源:origin: neo4j/neo4j

@Test
public void extensionShouldHavePublicNoArgConstructor()
{
  KernelExtensionFactory<?> instance = null;
  try
  {
    instance = newInstance();
  }
  catch ( IllegalArgumentException failure )
  {
    failure.printStackTrace();
    fail( "Contract violation: extension class must have public no-arg constructor (Exception in stderr)" );
  }
  assertNotNull( instance );
}

相关文章