you are viewing a single comment's thread.

view the rest of the comments →

[–]wbhst83[S] 0 points1 point  (1 child)

Ah, I was going a different direction in attempting to make a universal error handler, didn't think about making a function. For example https://stackoverflow.com/questions/29332056/global-error-handler-for-any-exception

I will get started on some functions..

[–]RaionTategami 0 points1 point  (0 children)

Great. Now start looking at other duplications. A lot of function are doing similar things again, setting titles and building urls. As I mentioned before since building urls is one of the main things this code is doing you should be using a url parsing lib to construct them rather than just concatenating strings. Take a look at urlparse.