nikhilgupta10 / GridLAB-D

Other
1 stars 0 forks source link

#159 Troubleshoot parser doesn't like macros, #895

Open nikhilgupta10 opened 8 years ago

nikhilgupta10 commented 8 years ago

The troubleshoot page parser does not like macro functions with other statements afterwards. e.g., overhead_line.cpp used to have:

if (config->phase##ph##_conductor && \

!gl_object_isa(config->phase##ph##_conductor, \overhead_line_conductor)) \

throw \invalid conductor for phase \ #ph \ of overhead line\; \
/* TROUBLESHOOT The conductor specified for the indicated phase is not necessarily an overhead line conductor, it may be an underground or triplex-line only conductor */ \

else if ((!config->phase##ph##_conductor) && hasphase(PHASE##ph)) \

throw \missing conductor for phase \ #ph \ of overhead line\;
/* TROUBLESHOOT
The conductor specified for the indicated phase for the overhead line is missing
or invalid.
*/

as code to check the phases. When the troubleshoot parser came through, it found the first TROUBLESHOOT message, but then proceeded to include the else if and second TROUBLESHOOT as part of the actual troubleshooting message (for the first throw). This problem is no longer an issue in overhead_line.cpp (via functions), but still may pop up in the future.

,

nikhilgupta10 commented 8 years ago

nikhilgupta10 imported these comments from Sourceforge: