fix bugs
This commit is contained in:
parent
c572fa5992
commit
0c43e416f5
1 changed files with 1 additions and 5 deletions
|
@ -34,11 +34,7 @@ public class BrowserContext {
|
|||
|
||||
private BrowserContext(String cookie, IRequestCatcher requestCatcher) {
|
||||
this.requestCatcher = requestCatcher;
|
||||
try {
|
||||
data = AsyncJSON.read(cookie).err(e -> {throw new RuntimeException(e);}).ok().await();
|
||||
} catch (Exception e) {
|
||||
data = new TCN("JSON");
|
||||
}
|
||||
AsyncJSON.read(cookie).then(x -> data = x).err(e -> data = new TCN("json")).ok().await();
|
||||
}
|
||||
|
||||
public static Task<BrowserContext> create(IRequestCatcher requestCatcher) {
|
||||
|
|
Loading…
Add table
Reference in a new issue