Author Topic: ability to indicate errors in ImportPackageXMI  (Read 4152 times)

Pawel Jasinski

  • EA User
  • **
  • Posts: 29
  • Karma: +0/-0
    • View Profile
ability to indicate errors in ImportPackageXMI
« on: May 06, 2014, 04:12:17 am »
As documented here: http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1399295629/0, there is no way to obtain information about import errors when using ImportPackageXMI.

The possible places to extend current API:
- return value (string) can be adopted to indicate success, success with errors or total failure
- log file can be used to capture detailed messages which are presented as msbox during interactive import

--pawel

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: ability to indicate errors in ImportPackageXMI
« Reply #1 on: May 06, 2014, 08:18:25 am »
I would prefer to get some kind of "consistent" error information. Probably in XML format. It would be nice if the GetLastError could be applied anywhere and if that would return something more than just a plain string.

q.

Pawel Jasinski

  • EA User
  • **
  • Posts: 29
  • Karma: +0/-0
    • View Profile
Re: ability to indicate errors in ImportPackageXMI
« Reply #2 on: May 06, 2014, 05:52:25 pm »
I think xml is overkill as a format to indicate success, completed with error or failure. Integer in a range -2..0 is sufficient.
In case of the messages xml adds only extra layer of quoting just in case message itself has sequences mimicking xml or being xml fragments.
I would really prefer not to invoke xml parser when error handling.

My requirements:
- Obligatory: don't fail silently
- Optional: provide enough information so human does not have to run interactive import to see the message. Ideally human does not have to use screen shot or retyping content of msgbox to provide error message information to 3rd parities.

--pawel

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: ability to indicate errors in ImportPackageXMI
« Reply #3 on: May 06, 2014, 07:39:29 pm »
Then maybe 2 methods: GetLastError just returning an integer code and GetLastErrorExtended returning a XML with code, short and long message and eventually more diagnostic data.

q.