Command line:
cobra 00030.cobra
this works fine, ok
C:\Users\RL\Cobra\bin>cobra 00030.COBRA (uppercase!)
gives:
An unhandled exception has occurred.
Cobra debugging tips:
To get file name and line number information for the stack frames, use:
cobra -debug foo.cobra
To get a post-mortem, HTML-formatted report with more details about your obj
ects:
cobra -debug -exception-report foo.cobra
For even more information, try:
cobra -debug -exception-report -detailed-stack-trace foo.cobra
Or use the abbreviations:
cobra -d -er -dst foo.cobra
Unhandled Exception: System.ComponentModel.Win32Exception: The specified executa
ble is not a valid Win32 application.
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startIn
fo)
at System.Diagnostics.Process.Start()
at CommandLine.DoRun(List`1 paths)
at CommandLine.Run(List`1 args)
at CommandLine.Run()
at CobraMain.Main()
I think this couldn't be right output.....
Forums
Little bug or my fault?
4 posts
• Page 1 of 1
Re: Little bug or my fault?
Debateable but I'd tend towards user error ( if only for relying on all apps to preserve Windows case-preserving-but-insensitive behaviour) ....
The compiler calculates the exe filename by looking for and removing any '.cobra' extension - what remains is used for the base exe name.
since the filename given uses an upcase extension '.COBRA' the compiled exe filename is .00030.COBRA.exe
the name passed to the .Net Process call to run (after compilation) is 00030.COBRA which through whatever magic checking it does determines that that name isnt an executable
and throws the error.
Note that the executable file exists and can be run after the compiler run directly
( I tested this using 100-PrintHelloWorld from HowTo dir)
compiling with lowercase extension (.cobra e.g. 100-PRINTHELLOWORLD.cobra) works fine (naturally)
You can see whats happening in both cases (upper and lower cases) running the compiler with -v option
You're better off using the same case (extensions at least) as described.
The compiler calculates the exe filename by looking for and removing any '.cobra' extension - what remains is used for the base exe name.
since the filename given uses an upcase extension '.COBRA' the compiled exe filename is .00030.COBRA.exe
the name passed to the .Net Process call to run (after compilation) is 00030.COBRA which through whatever magic checking it does determines that that name isnt an executable
and throws the error.
Note that the executable file exists and can be run after the compiler run directly
- Code: Select all
> cobra 00030.COBRA
... error..
> 00030.COBRA.exe
... runs
( I tested this using 100-PrintHelloWorld from HowTo dir)
compiling with lowercase extension (.cobra e.g. 100-PRINTHELLOWORLD.cobra) works fine (naturally)
You can see whats happening in both cases (upper and lower cases) running the compiler with -v option
You're better off using the same case (extensions at least) as described.
- hopscc
- Posts: 632
- Location: New Plymouth, Taranaki, New Zealand
Re: Little bug or my fault?
Interesting. Obviously everything is born by chance
C# compiler behaves differently, however, as far as i remember, it doesn't care about filename.cs or filename.CS.
Of course it's a minor question....
C# compiler behaves differently, however, as far as i remember, it doesn't care about filename.cs or filename.CS.
Of course it's a minor question....
- relez
- Posts: 69
Re: Little bug or my fault?
It's a weird issue as ALL CAPS isn't the norm on PCs anymore, but I went ahead and fixed it in development. "foo.COBRA" will compile and run just fine. The extension will be ".exe".
-Chuck
-Chuck
- Charles
- Posts: 2515
- Location: Los Angeles, CA
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 105 guests