try:
var fileContent = await transfer.reader.read(8192)
while fileContent.len() > 0:
totalLen += fileContent.len()
await c.writer.write(fileContent)
fileContent = await transfer.reader.read(8192)
except:
debug("transfer failed, message = $#" % [getCurrentExceptionMsg()])
exc = getCurrentException()
And the compiler is telling me the await c.writer.write(fileContent) line had a problem:
Error: 'yield' cannot be used within 'try' in a non-inlined iterator
What exactly does the error message mean?
@dom96 I was using 15b5f52 from the devel branch.
My other await lines in try blocks can compile with no problem, just this one in a while block failed.
var fileContent = await transfer.reader.read(8192)
while fileContent.len() > 0:
totalLen += fileContent.len()
try:
await c.writer.write(fileContent)
except:
debug("transfer failed, message = $#" % [getCurrentExceptionMsg()])
exc = getCurrentException()
fileContent = await transfer.reader.read(8192)