Skip to content

Commit f2a9902

Browse files
committed
Better errors in codeforces parser
1 parent 2341320 commit f2a9902

File tree

1 file changed

+1
-1
lines changed
  • src/cds/plugins/codeforces/src/main/kotlin/org/icpclive/cds/plugins/codeforces/api/results

1 file changed

+1
-1
lines changed

src/cds/plugins/codeforces/src/main/kotlin/org/icpclive/cds/plugins/codeforces/api/results/CFStatusWrapper.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ import java.io.IOException
77
internal class CFStatusWrapper<T : Any>(val status: String, private val comment: String? = null, val result: T? = null) {
88
fun unwrap(): T {
99
if (status != "OK") throw IOException("Error from codeforces: $comment")
10-
return result!!
10+
return result ?: throw IOException("Strange response from codeforces: status=${status}, commnet=$comment, result=null" )
1111
}
1212
}

0 commit comments

Comments
 (0)