• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

polserver / polserver / 25918451630

15 May 2026 12:43PM UTC coverage: 60.929% (+2.1%) from 58.859%
25918451630

push

github

turleypol
added dynamic property which returns a pointer of the object instead of
a copy like the current imp.
needed to be able to eg store a vector

43 of 61 new or added lines in 2 files covered. (70.49%)

14455 existing lines in 345 files now uncovered.

44695 of 73356 relevant lines covered (60.93%)

449621.59 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

88.24
/pol-core/bscript/berror.cpp
1
/** @file
2
 *
3
 * @par History
4
 */
5

6

7
#include "berror.h"
8

9
#include "contiter.h"
10
#include "impstr.h"
11

12

13
namespace Pol::Bscript
14
{
15
unsigned int BError::creations_ = 0;
16
unsigned int BError::creations()
1✔
17
{
18
  return creations_;
1✔
19
}
20

21
BError::BError() : BStruct( OTError )
4,177✔
22
{
23
  ++creations_;
4,177✔
24
}
4,177✔
25

26
BError::BError( const BError& other ) : BStruct( other, OTError )
106✔
27
{
28
  ++creations_;
106✔
29
}
106✔
30

31
BError::BError( std::istream& is, unsigned size ) : BStruct( is, size, OTError )
3✔
32
{
33
  ++creations_;
3✔
34
}
3✔
35

36
BError::BError( const char* err ) : BStruct( OTError )
1,422✔
37
{
38
  ++creations_;
1,422✔
39
  addMember( "errortext", new String( err ) );
1,422✔
40
}
1,422✔
41

42
BError::BError( const std::string& err ) : BStruct( OTError )
165✔
43
{
44
  ++creations_;
165✔
45
  addMember( "errortext", new String( err ) );
165✔
46
}
165✔
47

48

49
BObjectImp* BError::copy() const
106✔
50
{
51
  return new BError( *this );
106✔
52
}
53

54
char BError::packtype() const
3✔
55
{
56
  return 'e';
3✔
57
}
58

59
const char* BError::typetag() const
638✔
60
{
61
  return "error";
638✔
62
}
63

64
const char* BError::typeOf() const
10✔
65
{
66
  return "Error";
10✔
67
}
68

69
u8 BError::typeOfInt() const
24✔
70
{
71
  return OTError;
24✔
72
}
73

74
BObjectImp* BError::unpack( std::istream& is )
3✔
75
{
76
  unsigned size;
77
  char colon;
78
  if ( !( is >> size >> colon ) )
3✔
79
  {
UNCOV
80
    return new BError( "Unable to unpack struct elemcount" );
×
81
  }
82
  if ( (int)size <= 0 )
3✔
83
  {
84
    return new BError(
UNCOV
85
        "Unable to unpack struct elemcount. Length given must be positive integer!" );
×
86
  }
87
  if ( colon != ':' )
3✔
88
  {
UNCOV
89
    return new BError( "Unable to unpack struct elemcount. Bad format. Colon not found!" );
×
90
  }
91
  return new BError( is, size );
3✔
92
}
93

94

95
bool BError::isTrue() const
151✔
96
{
97
  return false;
151✔
98
}
99
/**
100
 * An error is equal to any other error or uninit
101
 */
102
bool BError::operator==( const BObjectImp& imp ) const
679✔
103
{
104
  return ( imp.isa( OTError ) || imp.isa( OTUninit ) );
679✔
105
}
106

107
bool BError::operator<( const BObjectImp& imp ) const
6✔
108
{
109
  if ( imp.isa( OTError ) || imp.isa( OTUninit ) )
6✔
UNCOV
110
    return false;  // Because it's equal can't be lesser
×
111

112
  return true;
6✔
113
}
114

115
ContIterator* BError::createIterator( BObject* /*pIterVal*/ )
15✔
116
{
117
  return new ContIterator();
15✔
118
}
119

120
BObjectRef BError::OperSubscript( const BObject& /*obj*/ )
9✔
121
{
122
  return BObjectRef( this );
9✔
123
}
124

UNCOV
125
BObjectImp* BError::array_assign( BObjectImp* /*idx*/, BObjectImp* /*target*/, bool /*copy*/ )
×
126
{
UNCOV
127
  return this;
×
128
}
129
}  // namespace Pol::Bscript
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc