|
@@ -105,9 +105,16 @@ public class ViewController extends Controller {
|
|
|
}
|
|
|
|
|
|
public void testTask2() {
|
|
|
- WeixinService wService = ServiceFactory.getService(WeixinService.class);
|
|
|
- String ssString = wService.requestWeixinQrcode("57f67d04ffdc4d91");
|
|
|
- renderText(ssString);
|
|
|
+ try {
|
|
|
+ WeixinService wService = ServiceFactory.getService(WeixinService.class);
|
|
|
+ String ssString = wService.requestWeixinQrcode("57f67d04ffdc4d91");
|
|
|
+ renderText(ssString);
|
|
|
+ } catch (Exception e) {
|
|
|
+ // TODO: handle exception
|
|
|
+ renderText(e.toString());
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
private String creatId() {
|
|
|
UUID id = UUID.randomUUID();
|