#!/usr/bin/env python3


import traceback

import traceback
try:
    raise Exception('Symbol needs to be a string of length 1.')
except:
    errorFile=open('error_log.txt','a')
    errorFile.write(traceback.format_exc())
    #errorFile.write(errorFile)
    errorFile.close()
    print('The traceback info was written error.log.txt')



def boxPrint(symbol, width, height):
    print(symbol * width)

    for i in range(height-2):
        print(symbol+(' '*(width-2))+symbol)
    print(symbol * width)

boxPrint('O',25,12)
boxPrint('#',32,8)
boxPrint('*',15,28)


def boxPrintE(symbol, width, height):

    if len(symbol)!=1:
        raise Exception('Symbol needs to be a string of length 1.')
    print(symbol * width)

    for i in range(height-2):
        print(symbol+(' '*(width-2))+symbol)
    print(symbol * width)

boxPrintE('O',25,12)
boxPrintE('##',32,8)




import traceback 
try:
    raise Exception('Symbol needs to be a string of length 1.')
except:
    errorFile=open('error_log.txt','a')
    errorFile.write(traceback.format_exc())
    #errorFile.write(errorFile)
    errorFile.close()
    print('The traceback info was written error.log.txt')


## Assertion - Asserting is sanity check
