Commits

Mathias Panzenböck committed a652eea

nicer exception handling

Comments (0)

Files changed (1)

 	elif opts.join:
 		if args:
 			parser.error('no arguments expected')
-		for fname in opts.join:
-			timeTable.joinf(fname)
-		timeTable.storef(opts.file)
+		try:
+			for fname in opts.join:
+				timeTable.joinf(fname)
+			timeTable.storef(opts.file)
+		except ValueError as e:
+			parser.error(str(e))
 	elif opts.current or (not args and not opts.end and not opts.repeat):
 		if args:
 			parser.error('no arguments expected')