Panda3D
configVariable.cxx
1 // Filename: configVariable.cxx
2 // Created by: drose (18Oct04)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #include "configVariable.h"
16 #include "config_prc.h"
17 
18 ////////////////////////////////////////////////////////////////////
19 // Function: ConfigVariable::report_unconstructed
20 // Access: Protected
21 // Description: Displays a suitable error message when an
22 // unconstructed ConfigVariable is attempted to be used.
23 // This normally indicates a static-init ordering issue.
24 ////////////////////////////////////////////////////////////////////
25 void ConfigVariable::
26 report_unconstructed() const {
27  prc_cat->error()
28  << "ConfigVariable " << this
29  << " accessed before its constructor has run!\n";
30  record_unconstructed();
31 }
32