Forums

Find answers, ask questions, and connect with our
community all around the world.

Home Forum Omnis General Forum Export/import JSON: Error Handling

  • Export/import JSON: Error Handling

    Posted by Alphonso Boren on February 1, 2017 at 10:05 am

    The export/import feature is really great and can be a very big step!
    But I feel slightly uncomfortable with the overall error handling.
    If one of the goals is to be able to export a library to SVN, then – from my point of view – it must be possible to export/import erroneous classes too.
    If we talk about SVN we do not talk about perfect code. We even do not talk about valid code.
    We talk about a current state of development. This means exporting a class containing “#???” for example
    should be a valid export. A missing superclass also should not prevent the export.
    There needs to be some kind of error reporting (export_errors.json) and maybe an additional info in the json of the corresponding, erroneous class.
    Another scenario might be bigger projects with external developers, when not every developer has access to the complete code. So, missing superclasses for example can be quite normal.
    At least, we need options to ignore those “problem childs”
    What about a learner’s guide “The 20 most common mistakes in writing omnis code?” It’ll never be possible to export this one 😉
    Another interesting side effect is the “error detection”. Many of the errors reported by the export tool are usually ignored by the interpreter. And there is no tool to find them.
    Therefore, we need an improved “Method Checker” or – even better – some kind of “Library Checker” to ensure code quality.
    Well, hm…wondering what others think about this …

    Miquel Àngel Rújula replied 8 months, 3 weeks ago 6 Members · 11 Replies
  • 11 Replies
  • Miquel Àngel Rújula

    Member
    November 11, 2024 at 9:37 am

    I completely agree. It’s a pity that nobody replied on this thread and that no improvement has been made in this regard. I’m trying to export a library and I have a cryptic error:

    Class: .unnamed_value

    Error code: 23490

    Error text: Member missing: classtype

    No clue about where the error is. I can’t look at hundreds of classes with several methods to check the class type.

    At least I’d like to be able to export, regardless of the errors in my code.

    As you, Alphonso, stated, the level of error checking is not consistent between the exporter and the interpreter.

Log in to reply.