Skip to content

Commit 3adeab8

Browse files
committed
don't accidentally catch the wrong exception
1 parent fa028e8 commit 3adeab8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/prof7bit/bitcoin/wallettool/fileformats/BlockchainInfoHandler.xtend

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import com.google.common.base.Charsets
77
import com.google.common.io.Files
88
import java.io.File
99
import java.math.BigInteger
10+
import org.json.JSONException
1011
import org.json.JSONObject
1112
import org.slf4j.Logger
1213
import org.slf4j.LoggerFactory
@@ -20,8 +21,8 @@ import org.spongycastle.crypto.paddings.PaddedBufferedBlockCipher
2021
import org.spongycastle.crypto.params.ParametersWithIV
2122
import org.spongycastle.util.encoders.Base64
2223
import prof7bit.bitcoin.wallettool.core.KeyObject
23-
import prof7bit.bitcoin.wallettool.exceptions.NeedSecondaryPasswordException
2424
import prof7bit.bitcoin.wallettool.exceptions.FormatFoundNeedPasswordException
25+
import prof7bit.bitcoin.wallettool.exceptions.NeedSecondaryPasswordException
2526

2627
/**
2728
* Strategy to handle the blockchain.info
@@ -61,7 +62,7 @@ class BlockchainInfoHandler extends AbstractImportExportHandler{
6162
// we just need to ask for a password now
6263
throw new FormatFoundNeedPasswordException
6364
}
64-
} catch (Exception e) {
65+
} catch (JSONException e) {
6566
// ... then it can only be version 1
6667
iterations = DefaultPBKDF2Iterations
6768
payload = fileContents

0 commit comments

Comments
 (0)