Recent

Author Topic: [SOLVED]Exception happened during unit conversion  (Read 3029 times)

ruk1n

  • New Member
  • *
  • Posts: 16
[SOLVED]Exception happened during unit conversion
« on: May 24, 2017, 01:56:37 pm »
Hello,

While trying to convert a Delphi project, Lazarus (1.6.4, fpc 3.0.2, Windows10 64) issued the following messages :
Quote
Messages, Hints: 14
Hint: * Converting file C:\cygwin64\home\ruk1n\BApp\serveur8.dpr *
Hint: Added defines -dBorland -dVer150 -dDelphi7 -dCompiler6_Up -dPUREPASCAL in custom options
Hint: Found all unit files
Hint: * Fixing used units for file C:\cygwin64\home\ruk1n\BApp\serveur8.dpr *
Hint:
Hint: *** Converting unit files belonging to project/package ***
Hint: * Converting file C:\cygwin64\home\ruk1n\BApp\IS.pas *
Hint: Changed encoding from cp1252 to UTF-8
Hint:
Hint: - Exception happened during unit conversion. Continuing with form files of already converted units...
Hint:
Hint: *** Fixing used units and Repairing form files ***
Hint: Conversion Aborted.
Hint: This log was saved to C:\cygwin64\home\ruk1n\BApp\AutomaticConversion.log

Where/how can I find the kind of exception that happened during the conversion ?

Thanks in advance
« Last Edit: May 24, 2017, 04:33:10 pm by ruk1n »

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4459
  • I like bugs.
Re: Exception happened during unit conversion
« Reply #1 on: May 24, 2017, 02:05:57 pm »
By debugging the converter code. For some reason it does not understand your Delphi code.
If you copy the project here, I can have a look.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

ruk1n

  • New Member
  • *
  • Posts: 16
Re: Exception happened during unit conversion
« Reply #2 on: May 24, 2017, 02:34:15 pm »
I'm afraid I can't disclose the whole source code here. Sorry.

I can imagine some reasons why the converter does not understand this Delphi code. The first one is variable names written with letters like "é" or "ç"... But is this enough to bug the converter ?

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4459
  • I like bugs.
Re: Exception happened during unit conversion
« Reply #3 on: May 24, 2017, 03:16:35 pm »
I can imagine some reasons why the converter does not understand this Delphi code. The first one is variable names written with letters like "é" or "ç"... But is this enough to bug the converter ?
Yes. They are not allowed in FPC. Are they allowed in Delphi? I don't think they are.
I will improve the error message later. It should include the actual exception message.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: Exception happened during unit conversion
« Reply #4 on: May 24, 2017, 03:26:10 pm »
I can imagine some reasons why the converter does not understand this Delphi code. The first one is variable names written with letters like "é" or "ç"... But is this enough to bug the converter ?

Yes they are since D2009

Thaddy

  • Hero Member
  • *****
  • Posts: 14212
  • Probably until I exterminate Putin.
Re: Exception happened during unit conversion
« Reply #5 on: May 24, 2017, 04:18:20 pm »
I can imagine some reasons why the converter does not understand this Delphi code. The first one is variable names written with letters like "é" or "ç"... But is this enough to bug the converter ?
Yes. They are not allowed in FPC. Are they allowed in Delphi? I don't think they are.
I will improve the error message later. It should include the actual exception message.

Yes they are. <sigh>
Specialize a type, not a var.

ruk1n

  • New Member
  • *
  • Posts: 16
Re: Exception happened during unit conversion
« Reply #6 on: May 24, 2017, 04:32:40 pm »
Yes, those _offending_ characters cause the converter to abort. I just checked it.

Thanks

 

TinyPortal © 2005-2018