A Alex69 Member Licensed User Longtime User Jul 30, 2012 #1 Very strange bug. Seems like devils magic... Compiling code. 0.03 Compiling layouts code. 0.00 Generating R file. 0.00 Compiling generated Java code. Error B4A line: 11 End Sub javac 1.7.0_04 src\com\newalarm\adder.java:344: error: 'try' without 'catch' or 'finally' try { ^ 1 error Code: 8 Sub Globals 9 Dim lst As ListView 10 Dim inp As InputDialog 11 End Sub Last edited: Jul 30, 2012
Very strange bug. Seems like devils magic... Compiling code. 0.03 Compiling layouts code. 0.00 Generating R file. 0.00 Compiling generated Java code. Error B4A line: 11 End Sub javac 1.7.0_04 src\com\newalarm\adder.java:344: error: 'try' without 'catch' or 'finally' try { ^ 1 error Code: 8 Sub Globals 9 Dim lst As ListView 10 Dim inp As InputDialog 11 End Sub
R Roger Garstang Well-Known Member Licensed User Longtime User Jul 30, 2012 #2 End Sub Looks indented or some char in front of or around it (Your other thread mentioned an error on that line too). When converting to Java there is probably a Try Catch Block around that function and without an End Sub the Java Compiler doesn't see the end of the Try Block.
End Sub Looks indented or some char in front of or around it (Your other thread mentioned an error on that line too). When converting to Java there is probably a Try Catch Block around that function and without an End Sub the Java Compiler doesn't see the end of the Try Block.
A Alex69 Member Licensed User Longtime User Jul 30, 2012 #3 Tried to enter "End Sub" manually... Didn't help. It somehow connected with "Dim" I think. When I remove them , everything works fine. The strangest bug of all times , indeed. This seems like anti-piracy protection but I have licensed program . Last edited: Jul 30, 2012
Tried to enter "End Sub" manually... Didn't help. It somehow connected with "Dim" I think. When I remove them , everything works fine. The strangest bug of all times , indeed. This seems like anti-piracy protection but I have licensed program .
Erel B4X founder Staff member Licensed User Longtime User Jul 31, 2012 #4 It is not an anti-piracy protection. Please post your code or at least some of it.
A Alex69 Member Licensed User Longtime User Jul 31, 2012 #5 :sign0060: Problem solved. I simply misplaced If - End If statement. That's my fault of course, but why B4A didn't detect it - I don't know.
:sign0060: Problem solved. I simply misplaced If - End If statement. That's my fault of course, but why B4A didn't detect it - I don't know.
mc73 Well-Known Member Licensed User Longtime User Jul 31, 2012 #6 Alex69 said: :sign0060: Problem solved. I simply misplaced If - End If statement. That's my fault of course, but why B4A didn't detect it - I don't know. Click to expand... That's why I was asking you to check for try...catch. Similarly to if blocks, and perhaps do loops, when they are not correctly closed, you get these type of errors
Alex69 said: :sign0060: Problem solved. I simply misplaced If - End If statement. That's my fault of course, but why B4A didn't detect it - I don't know. Click to expand... That's why I was asking you to check for try...catch. Similarly to if blocks, and perhaps do loops, when they are not correctly closed, you get these type of errors