~ubuntu-branches/ubuntu/utopic/slic3r/utopic

« back to all changes in this revision

Viewing changes to xs/src/utils.cpp

  • Committer: Package Import Robot
  • Author(s): Chow Loong Jin
  • Date: 2014-06-17 01:27:26 UTC
  • Revision ID: package-import@ubuntu.com-20140617012726-2wrs4zdo251nr4vg
Tags: upstream-1.1.4+dfsg
ImportĀ upstreamĀ versionĀ 1.1.4+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include <myinit.h>
 
2
 
 
3
void
 
4
confess_at(const char *file, int line, const char *func,
 
5
            const char *pat, ...)
 
6
{
 
7
    #ifdef SLIC3RXS
 
8
     va_list args;
 
9
     SV *error_sv = newSVpvf("Error in function %s at %s:%d: ", func,
 
10
         file, line);
 
11
 
 
12
     va_start(args, pat);
 
13
     sv_vcatpvf(error_sv, pat, &args);
 
14
     va_end(args);
 
15
 
 
16
     sv_catpvn(error_sv, "\n\t", 2);
 
17
 
 
18
     dSP;
 
19
     ENTER;
 
20
     SAVETMPS;
 
21
     PUSHMARK(SP);
 
22
     XPUSHs( sv_2mortal(error_sv) );
 
23
     PUTBACK;
 
24
     call_pv("Carp::confess", G_DISCARD);
 
25
     FREETMPS;
 
26
     LEAVE;
 
27
    #endif
 
28
}