-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Highlight not always present #15
Comments
Hi, Then adding the throws annotation "propergates" the exception handling. think of it just like java, where the responsible code is the code "seeing" the exception that is not "expected" to throw (eg the throws annotation marks which function is expected to throw exceptions and for which ones its unexpected). If you wanted the plugin to "ignore" these boundries, and show ALL potential exceptions, it would have to do both an expensive analysis of the entire codebase (which would tank performance), but also (even worse) existing code bases would very likely ALL be highlighted if there is any use of exceptions (as it would backtrack thoughout the whole code). |
Thanks a lot for these really clear explanations and precisions. |
My plan as of now is to hard code the kotlin std lib (for very obvious reasons the kotlin team will not annotate each method with throws which from their design stand point makes total sense) functions that does throw, and potentially add a setting to highlight them / not (since that might be against the "design" of kotlin). (it may require a tool since the kotlin std lib is quite huge... and its ever changing) :) So if I did that rather than starting to highlight calling methods which can have an exception at say N depth, would that be sufficient? |
Hello and thanks again for the detailed answer, Not sure if I understood correctly the third and last point but for the second point I get the tricky part of an already compiled called function that throws. I did not think of this cumbersome case. I was "naively" expecting smt that inspects the callee and search for a "throw" keyword inside it. For the first point , indeed that looks like colossal and temporary job. |
Hello and thanks a lot for your work,
The highlight seems to work for the "throw" key word but not for the use of the function itself.
Highlight shown :
Highlight I would expect to have :
Settings :
Currently using Android studio Giraffe with 2.0.0 Csense plugin and don't know what I am missing : /
Regards,
David
The text was updated successfully, but these errors were encountered: