Skip to content
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

Missing file/line information in NativeCall error #4269

Closed
p6rt opened this issue May 27, 2015 · 4 comments
Closed

Missing file/line information in NativeCall error #4269

p6rt opened this issue May 27, 2015 · 4 comments

Comments

@p6rt
Copy link

p6rt commented May 27, 2015

Migrated from rt.perl.org#125259 (status was 'resolved')

Searchable as RT125259$

@p6rt
Copy link
Author

p6rt commented May 27, 2015

From @drforr

NativeCall error does not report file name or line number.

--cut here--
use NativeCall;

class Marpa {
  my constant LIB = 'libmarpa.so.8.3';

  sub marpa_version
  ( CArray[Int] $version )
  returns Marpa-Error-Code
  is native( LIB ) { * }
}
--cut here--

--cut here--
===SORRY!===
CArray may only contain native integers and numbers, strings, C Structs
or C Pointers
--cut here--

@p6rt
Copy link
Author

p6rt commented Jun 23, 2015

From @jnthn

On Wed May 27 07​:57​:48 2015, drforr@​pobox.com wrote​:

NativeCall error does not report file name or line number.

--cut here--
use NativeCall;

class Marpa {
my constant LIB = 'libmarpa.so.8.3';

sub marpa_version
( CArray[Int] $version )
returns Marpa-Error-Code
is native( LIB ) { * }
}
--cut here--

--cut here--
===SORRY!===
CArray may only contain native integers and numbers, strings, C Structs
or C Pointers
--cut here--

You could reproduce it without NativeCall with a little effort too. Fixed it now; the error is a little funky but does much better explain where it is​:

===SORRY!=== Error while compiling bug3.p6
An exception occurred while parameterizing CArray
at bug3.p6​:7
Exception details​:
  ===SORRY!=== Error while compiling
  CArray may only contain native integers and numbers, strings, C Structs or C Pointers

Added a test that we get an exception with proper line number reporting in S32-exceptions/misc.t.

@p6rt
Copy link
Author

p6rt commented Jun 23, 2015

The RT System itself - Status changed from 'new' to 'open'

@p6rt p6rt closed this as completed Jun 23, 2015
@p6rt
Copy link
Author

p6rt commented Jun 23, 2015

@jnthn - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant