Skip to content

Commit 01f8f73

Browse files
committed
Commit before starting line references.
1 parent 9043d45 commit 01f8f73

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

TODO.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ Difficulty: hard
3333
This will probably need to interact with JavaFX. \
3434
This should be handled by somebody with experience using Java front-end. \
3535
Difficulty: medium
36+
- Write a better default parser. \
37+
The current parser uses RegEx for assembling patterns. \
38+
Since the matching is trivial, I think these can be converted to string-matches. \
39+
Difficulty: easy
3640

3741
### Least Important
3842
- Create a library for web-servers. \

src/main/java/mx/kenzie/skript/runtime/threading/ScriptExceptionHandler.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ public void uncaughtException(Thread source, Throwable throwable) {
77
if (throwable instanceof ThreadDeath) return;
88
if (source instanceof ScriptThread thread) {
99
final Class<?> start = thread.initiator;
10-
1110
System.err.println("An error has occurred.");
1211
if (start != null)
1312
System.err.println("Source: " + start.getName());
@@ -18,5 +17,5 @@ public void uncaughtException(Thread source, Throwable throwable) {
1817
+ source.getName() + "\" ");
1918
throwable.printStackTrace(System.err);
2019
}
21-
}
20+
} // TODO make errors pretty and helpful :)
2221
}

src/test/resources/lambda.bsk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function lambda_test:
2121
return 6
2222
set {var} to result of {supplier}
2323
assert {var} is 6: "Supplier result failed to return correctly."
24-
print result of a new supplier:
24+
assert result of a new supplier is "supplied value": "Supplier result failed to return correctly.":
2525
return "supplied value"
2626

2727
function return_test:

src/test/resources/provided_functions.bsk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ function handles:
77
assert has_java_field({system}, "out") is true: "Field access failed."
88
set {out} to get_java_field({system}, "out")
99
assert {out} exists: "Field retrieval failed."
10-
set {method} to get_java_method({out}, "println", {object})
10+
set {method} to get_java_method("hello", "toString")
1111
assert {method} exists: "Method retrieval failed."
12-
run {method} with "Called reflectively."
12+
assert result of {method} is "hello": "Reflective call failed."
1313

1414
function maths:
1515
trigger:

0 commit comments

Comments
 (0)