package com.vaguehope.onosendai.provider;

import twitter4j.TwitterException;

public final class TaskUtils {

	private TaskUtils () {
		throw new AssertionError();
	}

	public static String getEmsg(final Exception e) {
		if (e instanceof TwitterException) {
			final TwitterException te = (TwitterException) e;
			return String.format("%s %s", te.getErrorCode(), te.getErrorMessage());
		}
		return e.getMessage();
	}

}

@@ -305,16 +305,82 @@
 ion) e;%0A
+%09%09%09if (te.getErrorCode() %3E= 0 && te.getErrorMessage() != null) %7B%0A%09
 %09%09%09retur
@@ -446,16 +446,21 @@
 age());%0A
+%09%09%09%7D%0A
 %09%09%7D%0A%09%09re

Fix displaying TwitterException when twitter unreachable.