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

Command Line debugging fails to trace back external classes #1174

JoshuaMcManus opened this Issue Dec 5, 2017 · 0 comments


1 participant

JoshuaMcManus commented Dec 5, 2017

Brief Description

Refer to Issue #882 to see changes made for command line debugging. (See ignored test testbed/test/cruise.runtime.RuntimeErrorOutputTests.ExtendsClassExternal())

Command-line debugging is meant to be able to trace back to other Umple files that caused an error, even if they are not the files that contain the main function where the error occurred. In order to do this, while generating the Java code Umple creates a bunch of "uncaughtExceptionHandlers" in the Java file that contains the main function. Unfortunately, if a Umple class extends another (abstract) class from a file using the command "external", then it assumes the file is already precompiled and does not attempt to generate the "uncaughtExceptionHandlers" for any functions within that file. If the external file has errors in it the executing Umple file would not be able to display on the console the source of the error.

Minimum Steps to Reproduce

External class

class AbstractClass
    public abstract void foo();
    public void DivideByZero(int a) {
        a = a / 0;

Executing class

external AbstractClass {}

class ExtendsClassExternal
    isA AbstractClass;
    public void foo() {
        // Do Nothing
    public static void main(String[] argv) {
        ExtendsClassExternal x = new ExtendsClassExternal();;

Expected Result

java.lang.ArithmeticException: / by zero
	at test.AbstractClass.DivideByZero(AbstractClass.ump:9)
	at test.ExtendsClassExternal.main(test.ump:15)

Actual Result

java.lang.ArithmeticException: / by zero
	at test.AbstractClass.DivideByZero(
	at test.ExtendsClassExternal.main(test.ump:15)

Other Notes

I'm not sure if this is possible to implement, and even if it is I'm not sure if it is worth the time to implement. I have left this known issue here for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment