本文整理汇总了Java中java.text.ParseException.toString方法的典型用法代码示例。如果您正苦于以下问题:Java ParseException.toString方法的具体用法?Java ParseException.toString怎么用?Java ParseException.toString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类java.text.ParseException
的用法示例。
在下文中一共展示了ParseException.toString方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: CalendarParsedResult
import java.text.ParseException; //导入方法依赖的package包/类
public CalendarParsedResult(String summary, String startString, String endString, String
durationString, String location, String organizer, String[] attendees, String
description, double latitude, double longitude) {
super(ParsedResultType.CALENDAR);
this.summary = summary;
try {
this.start = parseDate(startString);
if (endString == null) {
long durationMS = parseDurationMS(durationString);
this.end = durationMS < 0 ? null : new Date(this.start.getTime() + durationMS);
} else {
try {
this.end = parseDate(endString);
} catch (ParseException pe) {
throw new IllegalArgumentException(pe.toString());
}
}
this.startAllDay = startString.length() == 8;
boolean z = endString != null && endString.length() == 8;
this.endAllDay = z;
this.location = location;
this.organizer = organizer;
this.attendees = attendees;
this.description = description;
this.latitude = latitude;
this.longitude = longitude;
} catch (ParseException pe2) {
throw new IllegalArgumentException(pe2.toString());
}
}
示例2: saveSchedule
import java.text.ParseException; //导入方法依赖的package包/类
private void saveSchedule() {
schedule.setName(textFieldPlaneName.getText());
schedule.setType(radioButtonWeek.isSelected() ? 0 : 1);
try {
schedule
.setTime_begin_1(c1.isSelected() ? Uses.FORMAT_HH_MM.parse(s1.getText()) : null);
schedule.setTime_end_1(c1.isSelected() ? Uses.FORMAT_HH_MM.parse(e1.getText()) : null);
schedule
.setTime_begin_2(c2.isSelected() ? Uses.FORMAT_HH_MM.parse(s2.getText()) : null);
schedule.setTime_end_2(c2.isSelected() ? Uses.FORMAT_HH_MM.parse(e2.getText()) : null);
schedule
.setTime_begin_3(c3.isSelected() ? Uses.FORMAT_HH_MM.parse(s3.getText()) : null);
schedule.setTime_end_3(c3.isSelected() ? Uses.FORMAT_HH_MM.parse(e3.getText()) : null);
schedule
.setTime_begin_4(c4.isSelected() ? Uses.FORMAT_HH_MM.parse(s4.getText()) : null);
schedule.setTime_end_4(c4.isSelected() ? Uses.FORMAT_HH_MM.parse(e4.getText()) : null);
schedule
.setTime_begin_5(c5.isSelected() ? Uses.FORMAT_HH_MM.parse(s5.getText()) : null);
schedule.setTime_end_5(c5.isSelected() ? Uses.FORMAT_HH_MM.parse(e5.getText()) : null);
schedule
.setTime_begin_6(c6.isSelected() ? Uses.FORMAT_HH_MM.parse(s6.getText()) : null);
schedule.setTime_end_6(c6.isSelected() ? Uses.FORMAT_HH_MM.parse(e6.getText()) : null);
schedule
.setTime_begin_7(c7.isSelected() ? Uses.FORMAT_HH_MM.parse(s7.getText()) : null);
schedule.setTime_end_7(c7.isSelected() ? Uses.FORMAT_HH_MM.parse(e7.getText()) : null);
schedule.setBreaks_1((QBreaks) cb1.getSelectedItem());
schedule.setBreaks_2((QBreaks) cb2.getSelectedItem());
schedule.setBreaks_3((QBreaks) cb3.getSelectedItem());
schedule.setBreaks_4((QBreaks) cb4.getSelectedItem());
schedule.setBreaks_5((QBreaks) cb5.getSelectedItem());
schedule.setBreaks_6((QBreaks) cb6.getSelectedItem());
schedule.setBreaks_7((QBreaks) cb7.getSelectedItem());
} catch (ParseException ex) {
throw new ServerException(ex.toString());
}
}